Skip to content

Commit

Permalink
fixup! fixup! [Scorecards] Added council suggestions for comparisson …
Browse files Browse the repository at this point in the history
…tool
  • Loading branch information
struan committed Nov 20, 2024
1 parent 3b5b242 commit 4900dba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scoring/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,11 @@ def get_context_data(self, **kwargs):
if group["type"].slug == "composite":
if comparisons:
# Filter out any related councils that are already being compared
comparison_slugs = {score.council.slug for score in comparisons}
context["similar_councils"] = [
sc
for sc in group["councils"]
if sc.slug not in {score.council.slug for score in comparisons}
if sc.slug not in comparison_slugs
]
else:
context["similar_councils"] = group["councils"]
Expand Down

0 comments on commit 4900dba

Please sign in to comment.