From c4b4ecdcfb19939f9d7e7399115dc0a90da44bf0 Mon Sep 17 00:00:00 2001 From: Tasos Katsoulas Date: Fri, 6 Dec 2024 12:33:28 +0200 Subject: [PATCH] Exclude dups from the query --- kitsune/flagit/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitsune/flagit/views.py b/kitsune/flagit/views.py index 6d2ab28eea7..2ec6b7e5fec 100644 --- a/kitsune/flagit/views.py +++ b/kitsune/flagit/views.py @@ -65,7 +65,7 @@ def flag(request, content_type=None, model=None, object_id=None, **kwargs): content_type=content_type, object_id=object_id, reason=FlaggedObject.REASON_CONTENT_MODERATION, - ) + ).exclude(status=FlaggedObject.FLAG_DUPLICATE) default_kwargs = {"content_object": content_object, "reason": reason, "notes": notes} if reason == FlaggedObject.REASON_CONTENT_MODERATION: moderation_flag_query.update(status=FlaggedObject.FLAG_PENDING)