Skip to content

Commit

Permalink
Merge pull request #91 from arthur-schnitzler/main
Browse files Browse the repository at this point in the history
code updates
  • Loading branch information
csae8092 authored Oct 9, 2024
2 parents 72902e1 + e420d93 commit de16b26
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apis_core/apis_entities/list_view_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class EventListFilter(MyBaseFilter):
name = django_filters.CharFilter(
lookup_expr="icontains",
label="Name des Ereignisses",
help_text="eingegebene Zeichenkette muss im Titel enthalten sein",
method="name_label_filter",
help_text="eingegebene Zeichenkette muss im Titel oder in einem der Labels enthalten sein",
)
year_of_creation = django_filters.NumberFilter(
field_name="start_date__year", label="Schöpfungsdatum", help_text="z.B. 1880"
Expand Down
3 changes: 2 additions & 1 deletion apis_core/apis_entities/list_view_institution.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class InstitutionListFilter(MyBaseFilter):
name = django_filters.CharFilter(
lookup_expr="icontains",
label="Name der Institution",
help_text="eingegebene Zeichenkette muss im Titel enthalten sein",
method="name_label_filter",
help_text="eingegebene Zeichenkette muss im Titel oder in einem der Labels enthalten sein",
)
year_of_creation = django_filters.NumberFilter(
field_name="start_date__year", label="Gründungsdatum", help_text="z.B. 1880"
Expand Down
7 changes: 7 additions & 0 deletions apis_core/apis_entities/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,13 @@ def test_015_wikidata_person_exist(self):
entity = get_or_create_person_from_wikidata(x.uri)
self.assertTrue(entity)

def test_015a_dont_duplicate_first_name_in_name(self):
"""see issue https://github.com/arthur-schnitzler/pmb-service/issues/217"""
entity = import_from_normdata(
"https://www.wikidata.org/wiki/Q2835019", "person"
)
self.assertFalse(entity.first_name in entity.name)

def test_016_import_nonsense_geonames(self):
client.login(**USER)
payload = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"metadata": {},
"outputs": [],
"source": [
"# run against production 2024-10-08\n",
"import os\n",
"from tqdm import tqdm\n",
"from django.core.exceptions import ObjectDoesNotExist\n",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ acdh-django-browsing
acdh_geonames_utils
acdh-id-reconciler>=0.2,<1
acdh-tei-pyutils>=1.1,<2
acdh-wikidata-pyutils>=1.1,<2
acdh-wikidata-pyutils>=1.2,<2
apis-override-select2js==0.1
Django>=5.1,<6
django-admin-csvexport
Expand Down

0 comments on commit de16b26

Please sign in to comment.