Correction d'un bug dans le renommage des étiquettes

See #383
This commit is contained in:
Jean-Marie Favreau 2025-04-03 19:11:34 +02:00
parent a84f9d4d36
commit b009ba692b

View File

@ -3003,9 +3003,9 @@ def rename_tag(request, t):
# find all recurrent imports and fix them
rimports = RecurrentImport.objects.filter(defaultTags__contains=[t])
for ri in rimports:
ri.tags = [te for te in ri.defaultTags if te != t]
ri.defaultTags = [te for te in ri.defaultTags if te != t]
if new_name not in ri.tags:
ri.tags += [new_name]
ri.defaultTags += [new_name]
RecurrentImport.objects.bulk_update(rimports, fields=["defaultTags"])
# find tag object