From f6af58ef51e81b39db03a1d7f57a17745b32574b Mon Sep 17 00:00:00 2001 From: yiorgos marinellis Date: Tue, 17 Mar 2020 23:47:02 +0100 Subject: [PATCH] Update ProofTransfer --- ereuse_devicehub/resources/proof/models.py | 2 +- ereuse_devicehub/resources/proof/schemas.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/proof/models.py b/ereuse_devicehub/resources/proof/models.py index fb1f676c..07739ecb 100644 --- a/ereuse_devicehub/resources/proof/models.py +++ b/ereuse_devicehub/resources/proof/models.py @@ -88,7 +88,7 @@ class ProofDevice(db.Model): class ProofTransfer(JoinedTableMixin, Proof): - transfer_id = Column(UUID, ForeignKey(Trade.id), nullable=False) + transfer_id = Column(UUID(as_uuid=True), ForeignKey(Trade.id), nullable=False) transfer = relationship(DisposeProduct, backref=backref("proof_transfer", lazy=True, diff --git a/ereuse_devicehub/resources/proof/schemas.py b/ereuse_devicehub/resources/proof/schemas.py index bc9143bc..1751dc20 100644 --- a/ereuse_devicehub/resources/proof/schemas.py +++ b/ereuse_devicehub/resources/proof/schemas.py @@ -32,6 +32,7 @@ class ProofTransfer(Proof): __doc__ = m.ProofTransfer.__doc__ transfer = NestedOn(s_action.DisposeProduct, required=True, + data_key='transferID', only_query='id')