From 0a96d4f6ef976dc69d450a55569977e07bd50a5b Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 15 Jun 2021 15:22:49 +0200 Subject: [PATCH] fixing schemas interdependences --- ereuse_devicehub/resources/lot/schemas.py | 2 +- ereuse_devicehub/resources/tradedocument/schemas.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ereuse_devicehub/resources/lot/schemas.py b/ereuse_devicehub/resources/lot/schemas.py index 5dcf9f63..5604cc2e 100644 --- a/ereuse_devicehub/resources/lot/schemas.py +++ b/ereuse_devicehub/resources/lot/schemas.py @@ -28,5 +28,5 @@ class Lot(Thing): transfer_state = EnumField(TransferState, description=m.Lot.transfer_state.comment) receiver_address = SanitizedStr(validate=f.validate.Length(max=42)) deliverynote = NestedOn(s_deliverynote.Deliverynote, dump_only=True) - documents = NestedOn(s_document.TradeDocument, dump_only=True) + documents = NestedOn('TradeDocument', many=True, dump_only=True) trade = NestedOn(s_action.Trade, dump_only=True) diff --git a/ereuse_devicehub/resources/tradedocument/schemas.py b/ereuse_devicehub/resources/tradedocument/schemas.py index e63610ec..8e96e54a 100644 --- a/ereuse_devicehub/resources/tradedocument/schemas.py +++ b/ereuse_devicehub/resources/tradedocument/schemas.py @@ -25,4 +25,3 @@ class TradeDocument(Thing): description=m.TradeDocument.file_hash.comment) url = URL(description=m.TradeDocument.url.comment) lot = NestedOn('Lot', only_query='id', description=m.TradeDocument.lot.__doc__) - # lot = NestedOn(s_lot.Lot, only_query='id', description=m.TradeDocument.lot.__doc__)