mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-27 00:07:16 +00:00
fix: [tags] debug
This commit is contained in:
parent
8bf67cf3b6
commit
0abc3fee0e
1 changed files with 3 additions and 0 deletions
|
@ -1468,10 +1468,13 @@ def _fix_tag_obj_id():
|
||||||
for obj_type in ail_core.get_all_objects():
|
for obj_type in ail_core.get_all_objects():
|
||||||
for tag in get_all_obj_tags(obj_type):
|
for tag in get_all_obj_tags(obj_type):
|
||||||
if ';' in tag:
|
if ';' in tag:
|
||||||
|
print(tag)
|
||||||
new_tag = tag.split(';')[0]
|
new_tag = tag.split(';')[0]
|
||||||
|
print(new_tag)
|
||||||
for raw in get_obj_by_tags(obj_type, [new_tag], nb_obj=500000):
|
for raw in get_obj_by_tags(obj_type, [new_tag], nb_obj=500000):
|
||||||
for global_id in raw.get('tagged_obj', []):
|
for global_id in raw.get('tagged_obj', []):
|
||||||
obj_type, subtype, obj_id = global_id.split(':', 2)
|
obj_type, subtype, obj_id = global_id.split(':', 2)
|
||||||
|
print(global_id)
|
||||||
delete_object_tag(tag, obj_type, obj_id, subtype=subtype)
|
delete_object_tag(tag, obj_type, obj_id, subtype=subtype)
|
||||||
add_object_tag(new_tag, obj_type, obj_id, subtype=subtype)
|
add_object_tag(new_tag, obj_type, obj_id, subtype=subtype)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue