Skip to content

Commit

Permalink
Wyświetlaj tylko zdefiniowane dyscypliny
Browse files Browse the repository at this point in the history
  • Loading branch information
mpasternak committed Jun 14, 2022
1 parent bf88997 commit acef25d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/raport_slotow/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class RaportZerowyFilter(django_filters.FilterSet):
widget=NumberInput(attrs={"placeholder": "max"}),
)
dyscyplina_naukowa = django_filters.ModelChoiceFilter(
queryset=Dyscyplina_Naukowa.objects.all()
queryset=Dyscyplina_Naukowa.objects.filter(
pk__in=Autorzy.objects.values("dyscyplina_naukowa_id").distinct()
)
)


Expand Down

0 comments on commit acef25d

Please sign in to comment.