From 225e018cdc21a2163bc9e0ad68c4382604c8537d Mon Sep 17 00:00:00 2001 From: emmdim Date: Wed, 11 Dec 2019 00:35:17 +0100 Subject: [PATCH] Adds deposit field in Computer --- ereuse_devicehub/resources/device/models.py | 2 +- ereuse_devicehub/resources/device/models.pyi | 4 ++-- ereuse_devicehub/resources/device/schemas.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 96fc459b..091222da 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -381,7 +381,7 @@ class Computer(Device): It is a subset of the Linux definition of DMI / DMI decode. """ - deposit = Column(Integer, check_range('deposit',min=0,max=100), default=0) + deposit = Column(Integer, check_range('deposit', min=0, max=100), default=0) owner_address = db.Column(CIText(), db.ForeignKey(User.ethereum_address), nullable=False, diff --git a/ereuse_devicehub/resources/device/models.pyi b/ereuse_devicehub/resources/device/models.pyi index 36a9b156..f785cff4 100644 --- a/ereuse_devicehub/resources/device/models.pyi +++ b/ereuse_devicehub/resources/device/models.pyi @@ -155,8 +155,8 @@ class Computer(DisplayMixin, Device): self.owner_address = ... # type: UUID self.transfer_state = ... self.receiver_address = ... # type: str - self.deliverynote_address = ... # type: str - + self.deliverynote_address = ... # type: str + @property def actions(self) -> List: pass diff --git a/ereuse_devicehub/resources/device/schemas.py b/ereuse_devicehub/resources/device/schemas.py index f7d7fcb7..69098d6f 100644 --- a/ereuse_devicehub/resources/device/schemas.py +++ b/ereuse_devicehub/resources/device/schemas.py @@ -129,7 +129,7 @@ class Computer(Device): transfer_state = EnumField(enums.TransferState, description=m.Computer.transfer_state.comment) receiver_address = SanitizedStr(validate=f.validate.Length(max=42)) deliverynote_address = SanitizedStr(validate=f.validate.Length(max=42)) - + class Desktop(Computer): __doc__ = m.Desktop.__doc__