Skip to content
Snippets Groups Projects
Commit 7ad5798a authored by Alexa Valentová's avatar Alexa Valentová
Browse files

distinctify people

parent 99dbe210
No related branches found
No related tags found
2 merge requests!1200handle transport server errors,!1199distinctify people
Pipeline #20188 passed
...@@ -153,6 +153,8 @@ class OctopusMixin(blocks.StructBlock): ...@@ -153,6 +153,8 @@ class OctopusMixin(blocks.StructBlock):
originating_groups__name=value["group_shortcut"] originating_groups__name=value["group_shortcut"]
) )
.order_by("person__order", "title") .order_by("person__order", "title")
# Hacky, but should work all of the time with our current members.
.distinct("person__order", "title")
.all() .all()
) )
...@@ -217,6 +219,8 @@ class OctopusTeamBlock(OctopusMixin): ...@@ -217,6 +219,8 @@ class OctopusTeamBlock(OctopusMixin):
context["person_list"] = ( context["person_list"] = (
DistrictOctopusPersonPage.objects.filter(filter) DistrictOctopusPersonPage.objects.filter(filter)
.order_by("person__order", "title") .order_by("person__order", "title")
# Hacky, but should work all of the time with our current members.
.distinct("person__order", "title")
.all() .all()
) )
......
...@@ -24,7 +24,8 @@ def get_block_octopus_person_list(block): ...@@ -24,7 +24,8 @@ def get_block_octopus_person_list(block):
return ( return (
DistrictOctopusPersonPage.objects.filter(filter) DistrictOctopusPersonPage.objects.filter(filter)
.order_by("person__order", "title") .order_by("person__order", "title")
.distinct() # Hacky, but should work all of the time with our current members.
.distinct("person__order", "title")
.live() .live()
.all() .all()
) )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment