adding documents in schema of lots

This commit is contained in:
Cayo Puigdefabregas 2021-06-15 15:14:29 +02:00
parent 814922dbff
commit f7070dbbf7
1 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ from ereuse_devicehub.marshmallow import NestedOn
from ereuse_devicehub.resources.deliverynote import schemas as s_deliverynote
from ereuse_devicehub.resources.device import schemas as s_device
from ereuse_devicehub.resources.action import schemas as s_action
from ereuse_devicehub.resources.tradedocument import schemas as s_document
from ereuse_devicehub.resources.enums import TransferState
from ereuse_devicehub.resources.lot import models as m
from ereuse_devicehub.resources.models import STR_SIZE
@ -27,4 +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)
trade = NestedOn(s_action.Trade, dump_only=True)