From 390fb30d4f8bfb10fa1b3195565c2822edd8ca64 Mon Sep 17 00:00:00 2001 From: yiorgos marinellis Date: Tue, 17 Mar 2020 23:45:23 +0100 Subject: [PATCH] Update ProofRecycle --- ereuse_devicehub/resources/proof/models.py | 2 ++ ereuse_devicehub/resources/proof/schemas.py | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ereuse_devicehub/resources/proof/models.py b/ereuse_devicehub/resources/proof/models.py index 4aa4f2fa..fb1f676c 100644 --- a/ereuse_devicehub/resources/proof/models.py +++ b/ereuse_devicehub/resources/proof/models.py @@ -130,3 +130,5 @@ class ProofRecycling(JoinedTableMixin, Proof): contact = Column(CIText(), default='', nullable=False) ticket = Column(CIText(), default='', nullable=False) gps_location = Column(CIText(), default='', nullable=False) + recycler_code = Column(CIText(), default='', nullable=False) + diff --git a/ereuse_devicehub/resources/proof/schemas.py b/ereuse_devicehub/resources/proof/schemas.py index 26479e50..bc9143bc 100644 --- a/ereuse_devicehub/resources/proof/schemas.py +++ b/ereuse_devicehub/resources/proof/schemas.py @@ -57,8 +57,9 @@ class ProofReuse(Proof): class ProofRecycling(Proof): __doc__ = m.ProofRecycling.__doc__ - collection_point = SanitizedStr(default='') - date = DateTime() - contact = SanitizedStr(default='') - ticket = SanitizedStr(default='') - gps_location = SanitizedStr(default='') + collection_point = SanitizedStr(default='', data_key='collectionPoint', required=True) + date = DateTime('iso', required=True) + contact = SanitizedStr(default='', required=True) + ticket = SanitizedStr(default='', required=True) + gps_location = SanitizedStr(default='', data_key='gpsLocation', required=True) + recycler_code = SanitizedStr(default='', data_key='recyclerCode', required=True)