From 9db37dc37dfd7644588f571551fca2fe8e2dc75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zsombor=20F=C3=B6ldi?= Date: Sat, 21 Dec 2024 22:08:28 +0000 Subject: [PATCH] add Pierpont Morgan Number --- ebl/fragmentarium/application/fragment_fields_schemas.py | 1 + ebl/fragmentarium/domain/fragment_external_numbers.py | 5 +++++ ebl/tests/factories/fragment.py | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ebl/fragmentarium/application/fragment_fields_schemas.py b/ebl/fragmentarium/application/fragment_fields_schemas.py index 496b405be..e13c69f8a 100644 --- a/ebl/fragmentarium/application/fragment_fields_schemas.py +++ b/ebl/fragmentarium/application/fragment_fields_schemas.py @@ -129,6 +129,7 @@ class ExternalNumbersSchema(Schema): load_default="", data_key="hilprechtHeidelbergNumber" ) metropolitan_number = fields.String(load_default="", data_key="metropolitanNumber") + pierpont_morgan_number = fields.String(load_default="", data_key="pierpontMorganNumber") yale_peabody_number = fields.String(load_default="", data_key="yalePeabodyNumber") louvre_number = fields.String(load_default="", data_key="louvreNumber") dublin_tcd_number = fields.String(load_default="", data_key="dublinTcdNumber") diff --git a/ebl/fragmentarium/domain/fragment_external_numbers.py b/ebl/fragmentarium/domain/fragment_external_numbers.py index b9edcd5e9..af9b03c33 100644 --- a/ebl/fragmentarium/domain/fragment_external_numbers.py +++ b/ebl/fragmentarium/domain/fragment_external_numbers.py @@ -13,6 +13,7 @@ class ExternalNumbers: hilprecht_jena_number: str = "" hilprecht_heidelberg_number: str = "" metropolitan_number: str = "" + pierpont_morgan_number: str = "" louvre_number: str = "" dublin_tcd_number: str = "" alalah_hpm_number: str = "" @@ -71,6 +72,10 @@ def yale_peabody_number(self) -> str: def metropolitan_number(self) -> str: return self._get_external_number("metropolitan_number") + @property + def pierpont_morgan_number(self) -> str: + return self._get_external_number("pierpont_morgan_number") + @property def louvre_number(self) -> str: return self._get_external_number("louvre_number") diff --git a/ebl/tests/factories/fragment.py b/ebl/tests/factories/fragment.py index c34da02e1..0ab7cee2e 100644 --- a/ebl/tests/factories/fragment.py +++ b/ebl/tests/factories/fragment.py @@ -188,9 +188,10 @@ class Meta: lambda n: f"hilprecht-heidelberg-{n}" ) metropolitan_number = factory.Sequence(lambda n: f"metropolitan-number-{n}") + pierpont_morgan_number = factory.Sequence(lambda n: f"pierpont-morgan-number-{n}") louvre_number = factory.Sequence(lambda n: f"louvre-number-{n}") - dublin_tcd_number = factory.Sequence(lambda n: f"dublin_tcd_number-{n}") - alalah_hpm_number = factory.Sequence(lambda n: f"alalah_hpm_number-{n}") + dublin_tcd_number = factory.Sequence(lambda n: f"dublin-tcd-number-{n}") + alalah_hpm_number = factory.Sequence(lambda n: f"alalah-hpm-number-{n}") australianinstituteofarchaeology_number = factory.Sequence( lambda n: f"australianinstituteofarchaeology-number-{n}" )