From 834ade3021ab7e932628fc8ba37eb5789441f6a7 Mon Sep 17 00:00:00 2001 From: matthewdylan <88053677+matthewdylan@users.noreply.github.com> Date: Wed, 1 May 2024 12:31:34 -0500 Subject: [PATCH] Okay, trying again to fix tag_kwargs issue --- taggit/managers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/taggit/managers.py b/taggit/managers.py index 35d49a80..7ce01b9e 100644 --- a/taggit/managers.py +++ b/taggit/managers.py @@ -310,10 +310,13 @@ def set(self, tags, *, through_defaults=None, **kwargs): self.add(*new_objs, through_defaults=through_defaults, **kwargs) @require_instance_manager - def remove(self, *tags): + def remove(self, *tags, tag_kwargs=None): if not tags: return - tag_objs = self._to_tag_model_instances(tags) + if tag_kwargs is None: + tag_kwargs = {} + + tag_objs = self._to_tag_model_instances(tags, tag_kwargs) self._remove_prefetched_objects() db = router.db_for_write(self.through, instance=self.instance)