def update(tag): res = False current_tag = get_tag_by_name(tag.get('installation'), tag.get('controller_ip'), tag.get('name')) if current_tag and current_tag != tag: res = tag_dao.update_tag(tag) if res: print('Updated tag with name: ' + tag['name']) sync = {} sync['installation'] = tag['installation'] sync['method'] = sync_methods.UPDATE sync['table'] = 'tags' sync['data'] = tag sync['prev'] = None res = syncHandler.insert(sync) return res
def update(tag): print("trying to update tag") return tag_dao.update_tag(tag)