parent
a84f9d4d36
commit
b009ba692b
@ -3003,9 +3003,9 @@ def rename_tag(request, t):
|
|||||||
# find all recurrent imports and fix them
|
# find all recurrent imports and fix them
|
||||||
rimports = RecurrentImport.objects.filter(defaultTags__contains=[t])
|
rimports = RecurrentImport.objects.filter(defaultTags__contains=[t])
|
||||||
for ri in rimports:
|
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:
|
if new_name not in ri.tags:
|
||||||
ri.tags += [new_name]
|
ri.defaultTags += [new_name]
|
||||||
RecurrentImport.objects.bulk_update(rimports, fields=["defaultTags"])
|
RecurrentImport.objects.bulk_update(rimports, fields=["defaultTags"])
|
||||||
|
|
||||||
# find tag object
|
# find tag object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user