Skip to content

Commit

Permalink
fix: [tags] debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Jan 8, 2024
1 parent 07c51e1 commit 4b21cc2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bin/lib/Tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,11 +1472,10 @@ def _fix_tag_obj_id():
new_tag = tag.split(';')[0]
print(new_tag)
raw = get_obj_by_tags(obj_type, [new_tag], nb_obj=500000)
for global_id in raw.get('tagged_obj', []):
print(global_id)
obj_type, subtype, obj_id = global_id.split(':', 2)
delete_object_tag(tag, obj_type, obj_id, subtype=subtype)
add_object_tag(new_tag, obj_type, obj_id, subtype=subtype)
for obj_id in raw.get('tagged_obj', []):
print(obj_id)
delete_object_tag(tag, obj_type, obj_id)
add_object_tag(new_tag, obj_type, obj_id)


# if __name__ == '__main__':
Expand Down

0 comments on commit 4b21cc2

Please sign in to comment.