From 8baadfbf9910d33c788354742e16f1940e8936b3 Mon Sep 17 00:00:00 2001 From: zsomborfoldi <96750736+zsomborfoldi@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:00:40 +0100 Subject: [PATCH] add sector (#588) --- ebl/fragmentarium/application/archaeology_schemas.py | 1 + ebl/fragmentarium/domain/findspot.py | 1 + ebl/tests/factories/archaeology.py | 1 + 3 files changed, 3 insertions(+) diff --git a/ebl/fragmentarium/application/archaeology_schemas.py b/ebl/fragmentarium/application/archaeology_schemas.py index e80e4170b..14c5d1351 100644 --- a/ebl/fragmentarium/application/archaeology_schemas.py +++ b/ebl/fragmentarium/application/archaeology_schemas.py @@ -43,6 +43,7 @@ def create_excavation_plan(self, data, **kwargs) -> ExcavationPlan: class FindspotSchema(Schema): id_ = fields.Integer(required=True, data_key="_id") site = site_field + sector = fields.String() area = fields.String() building = fields.String() building_type = NameEnumField( diff --git a/ebl/fragmentarium/domain/findspot.py b/ebl/fragmentarium/domain/findspot.py index 8067a90ac..5249d2563 100644 --- a/ebl/fragmentarium/domain/findspot.py +++ b/ebl/fragmentarium/domain/findspot.py @@ -28,6 +28,7 @@ class ExcavationPlan: class Findspot: id_: int site: Optional[ExcavationSite] = None + sector: str = "" area: str = "" building: str = "" building_type: Optional[BuildingType] = None diff --git a/ebl/tests/factories/archaeology.py b/ebl/tests/factories/archaeology.py index cc046fcad..80d651fa5 100644 --- a/ebl/tests/factories/archaeology.py +++ b/ebl/tests/factories/archaeology.py @@ -53,6 +53,7 @@ class Meta: site = factory.fuzzy.FuzzyChoice( set(ExcavationSite) - {ExcavationSite.STANDARD_TEXT} ) + sector = factory.Faker("word") area = factory.Faker("word") building = factory.Faker("word") building_type = factory.fuzzy.FuzzyChoice(set(BuildingType))