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')