fix: [correlation tags] fix tag all objects

This commit is contained in:
Terrtia 2023-06-29 15:02:57 +02:00
parent f545daaa43
commit fa8b4a67d9
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -336,7 +336,7 @@ def get_obj_correlations(obj_type, subtype, obj_id):
return obj.get_correlations() return obj.get_correlations()
def _get_obj_correlations_objs(objs, obj_type, subtype, obj_id, filter_types, lvl, nb_max): def _get_obj_correlations_objs(objs, obj_type, subtype, obj_id, filter_types, lvl, nb_max):
if len(objs) < nb_max or nb_max == -1: if len(objs) < nb_max or nb_max == 0:
if lvl == 0: if lvl == 0:
objs.add((obj_type, subtype, obj_id)) objs.add((obj_type, subtype, obj_id))
@ -356,6 +356,7 @@ def get_obj_correlations_objs(obj_type, subtype, obj_id, filter_types=[], lvl=0,
return objs return objs
def obj_correlations_objs_add_tags(obj_type, subtype, obj_id, tags, filter_types=[], lvl=0, nb_max=300): def obj_correlations_objs_add_tags(obj_type, subtype, obj_id, tags, filter_types=[], lvl=0, nb_max=300):
print(nb_max)
objs = get_obj_correlations_objs(obj_type, subtype, obj_id, filter_types=filter_types, lvl=lvl, nb_max=nb_max) objs = get_obj_correlations_objs(obj_type, subtype, obj_id, filter_types=filter_types, lvl=lvl, nb_max=nb_max)
# print(objs) # print(objs)
for obj_tuple in objs: for obj_tuple in objs: