Skip to content

Commit

Permalink
Merge pull request #6255 from akatsoulas/moderation-tool-no-topics
Browse files Browse the repository at this point in the history
Do not overwrite query
  • Loading branch information
akatsoulas authored Sep 25, 2024
2 parents 6932d50 + a12a1ca commit d2f4eff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kitsune/flagit/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,17 @@ def flagged_queue(request):
"""The flagged queue."""
reason = request.GET.get("reason")
objects = FlaggedObject.objects.pending()
question_content_type = ContentType.objects.get_for_model(Question)
available_topics = []

question_content_type = ContentType.objects.get_for_model(Question)
if reason:
objects = objects.filter(reason=reason)

for object in objects:
if object.content_type == question_content_type:
question = object.content_object
available_topics = Topic.active.filter(products=question.product, in_aaq=True)
object.available_topics = available_topics
if reason:
objects = objects.filter(reason=reason)

return render(
request,
Expand Down

0 comments on commit d2f4eff

Please sign in to comment.