From 22e3469129e488b04418a9d66dde7a3ff3f87b3f Mon Sep 17 00:00:00 2001 From: yiorgos marinellis Date: Tue, 3 Mar 2020 20:32:34 +0100 Subject: [PATCH] Embed deliverynote to lot schema --- ereuse_devicehub/resources/lot/schemas.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/resources/lot/schemas.py b/ereuse_devicehub/resources/lot/schemas.py index 1cb10b24..b23110be 100644 --- a/ereuse_devicehub/resources/lot/schemas.py +++ b/ereuse_devicehub/resources/lot/schemas.py @@ -4,6 +4,7 @@ from teal.marshmallow import SanitizedStr, URL, EnumField from ereuse_devicehub.marshmallow import NestedOn from ereuse_devicehub.resources.device import schemas as s_device from ereuse_devicehub.resources.lot import models as m +from ereuse_devicehub.resources.deliverynote import schemas as s_deliverynote from ereuse_devicehub.resources.models import STR_SIZE from ereuse_devicehub.resources.schemas import Thing from ereuse_devicehub.resources.enums import TransferState @@ -24,4 +25,4 @@ class Lot(Thing): owner_address = SanitizedStr(validate=f.validate.Length(max=42)) transfer_state = EnumField(TransferState, description=m.Lot.transfer_state.comment) receiver_address = SanitizedStr(validate=f.validate.Length(max=42)) - deliverynote_address = SanitizedStr(validate=f.validate.Length(max=42)) \ No newline at end of file + deliverynotes = NestedOn(s_deliverynote.Deliverynote, many=True, dump_only=True)