def vocabulary_dict_update(vocabulary_dict, context):
    model = context['model']
    session = context['session']
    vocabulary_obj = model.vocabulary.Vocabulary.get(vocabulary_dict['id'])
    if vocabulary_dict.has_key('name'):
        vocabulary_obj.name = vocabulary_dict['name']
    if vocabulary_dict.has_key('tags'):
        vocabulary_tag_list_save(vocabulary_dict['tags'], vocabulary_obj, context)
    return vocabulary_obj
def vocabulary_dict_update(vocabulary_dict, context):
    model = context['model']
    session = context['session']
    vocabulary_obj = model.vocabulary.Vocabulary.get(vocabulary_dict['id'])
    if vocabulary_dict.has_key('name'):
        vocabulary_obj.name = vocabulary_dict['name']
    if vocabulary_dict.has_key('tags'):
        vocabulary_tag_list_save(vocabulary_dict['tags'], vocabulary_obj, context)
    return vocabulary_obj