diff --git a/ebl/fragmentarium/application/fragment_fields_schemas.py b/ebl/fragmentarium/application/fragment_fields_schemas.py index 152fb6718..0270418e4 100644 --- a/ebl/fragmentarium/application/fragment_fields_schemas.py +++ b/ebl/fragmentarium/application/fragment_fields_schemas.py @@ -145,6 +145,7 @@ class ExternalNumbersSchema(Schema): oracc_numbers = fields.List( fields.String(), load_default=(), data_key="oraccNumbers" ) + digitale_keilschrift_bibliothek = fields.String(load_default="", data_key="digitaleKeilschriftBibliothek") seal_numbers = fields.List(fields.String(), load_default=(), data_key="sealNumbers") @post_load diff --git a/ebl/fragmentarium/domain/fragment_external_numbers.py b/ebl/fragmentarium/domain/fragment_external_numbers.py index af9b03c33..687dd3b1d 100644 --- a/ebl/fragmentarium/domain/fragment_external_numbers.py +++ b/ebl/fragmentarium/domain/fragment_external_numbers.py @@ -21,6 +21,7 @@ class ExternalNumbers: philadelphia_number: str = "" achemenet_number: str = "" nabucco_number: str = "" + digitale_keilschrift_bibliothek: str = "" yale_peabody_number: str = "" oracc_numbers: Sequence[str] = () seal_numbers: Sequence[str] = () @@ -100,6 +101,10 @@ def achemenet_number(self) -> str: def nabucco_number(self) -> str: return self._get_external_number("nabucco") + @property + def digitale_keilschrift_bibliothek(self) -> str: + return self._get_external_number("digitale_keilschrift_bibliothek") + @property def philadelphia_number(self) -> str: return self._get_external_number("philadelphia_number") diff --git a/ebl/tests/factories/fragment.py b/ebl/tests/factories/fragment.py index 0ab7cee2e..579d12975 100644 --- a/ebl/tests/factories/fragment.py +++ b/ebl/tests/factories/fragment.py @@ -199,6 +199,7 @@ class Meta: yale_peabody_number = factory.Sequence(lambda n: f"yale-peabody-number-{n}") achemenet_number = factory.Sequence(lambda n: f"achemenet-number-{n}") nabucco_number = factory.Sequence(lambda n: f"nabucco-number-{n}") + digitale_keilschrift_bibliothek = factory.Sequence(lambda n: f"digitale-keilschrift-bibliothek-{n}") oracc_numbers = factory.List( [factory.Sequence(lambda n: f"oracc-number-{n}")], TupleFactory )