filter ObstacleGroup in legend endpoint by in_legend
This commit is contained in:
parent
d49b6d6645
commit
30b467005c
1 changed files with 1 additions and 0 deletions
|
@ -354,6 +354,7 @@ def legend_for_theme(request, theme_id: int):
|
|||
Prefetch('spaces', Space.qs_for_request(request))
|
||||
)
|
||||
obstaclegroups = ObstacleGroup.objects.filter(
|
||||
in_legend=True,
|
||||
pk__in=set(Obstacle.qs_for_request(request).filter(group__isnull=False).values_list('group', flat=True)),
|
||||
)
|
||||
return LegendSchema(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue