From f54d8c973c76a78fd51ee0382208a1c554f94f2b Mon Sep 17 00:00:00 2001 From: Miguel Johnson Date: Mon, 15 Jul 2024 01:27:06 -0400 Subject: [PATCH] adding a filter and update method instead of save for tags merge --- taggit/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/taggit/admin.py b/taggit/admin.py index 8d8084ec..1580ef55 100644 --- a/taggit/admin.py +++ b/taggit/admin.py @@ -59,8 +59,8 @@ def merge_tags_view(self, request): tagged_items = TaggedItem.objects.filter(tag=tag) for tagged_item in tagged_items: tagged_item.tag = new_tag - tagged_item.save() - # tag.delete() #this will delete the selected tags after merge + TaggedItem.objects.filter(tag=tag).update(tag=new_tag) + # tag.delete() #this will delete the selected tags after merge...leaving out for now self.message_user(request, "Tags have been merged") # clear the selected_tag_ids from session after merge is complete