From bf8899739de3ad59877d01a8b23fc9a941481cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pasternak?= Date: Wed, 15 Jun 2022 00:34:25 +0200 Subject: [PATCH 1/2] Aktualna jednostka w raportach 'zerowych' (#1224) --- HISTORY.rst | 1 + src/raport_slotow/tables.py | 1 + 2 files changed, 2 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index d3443ca5e..8ced3d2da 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -19,6 +19,7 @@ dev poleceń -- polecenie ``pbn_show_json`` (b/n), * poprawnie wysyłaj strony do PBN API (#1176), * podgląd edycji schematu opisu bibliograficznego (#898), +* informacja o aktualnej jednostce w raportach "zerowych" (#1224) 202205.1086 ----------- diff --git a/src/raport_slotow/tables.py b/src/raport_slotow/tables.py index 683850dba..617e5678a 100644 --- a/src/raport_slotow/tables.py +++ b/src/raport_slotow/tables.py @@ -170,6 +170,7 @@ class Meta: model = RaportZerowyEntry fields = ( "autor", + "autor__aktualna_jednostka", "autor__pbn_id", "autor__orcid", "lata", From acef25d146f57c92ad8a25b8f1c82b4ba671c609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pasternak?= Date: Wed, 15 Jun 2022 00:34:41 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Wy=C5=9Bwietlaj=20tylko=20zdefiniowane=20dy?= =?UTF-8?q?scypliny?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/raport_slotow/filters.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/raport_slotow/filters.py b/src/raport_slotow/filters.py index 4aecddf88..b4ce66d02 100644 --- a/src/raport_slotow/filters.py +++ b/src/raport_slotow/filters.py @@ -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() + ) )