From 8b4c27dfe294bae61552b775e15cf50f332cec83 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 23 Nov 2020 18:35:50 +0100 Subject: [PATCH] modify live model --- ereuse_devicehub/resources/action/models.py | 22 +++------------------ 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index 4b14fda9..94fabd1e 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -1295,25 +1295,9 @@ class Live(JoinedWithOneDeviceMixin, ActionWithOneDevice): information about its state (in the form of a ``Snapshot`` action) and usage statistics. """ - ip = Column(IP, nullable=False, - comment='The IP where the live was triggered.') - subdivision_confidence = Column(SmallInteger, - check_range('subdivision_confidence', 0, 100), - nullable=False) - subdivision = Column(DBEnum(Subdivision), nullable=False) - city = Column(Unicode(STR_SM_SIZE), check_lower('city'), nullable=False) - city_confidence = Column(SmallInteger, - check_range('city_confidence', 0, 100), - nullable=False) - isp = Column(Unicode(STR_SM_SIZE), check_lower('isp'), nullable=False) - organization = Column(Unicode(STR_SM_SIZE), check_lower('organization')) - organization_type = Column(Unicode(STR_SM_SIZE), check_lower('organization_type')) - - @property - def country(self) -> Country: - return self.subdivision.country - # todo relate to snapshot - # todo testing + serial_number = Column(Unicode(), check_lower('serial_number')) + serial_number.comment = """The serial number of the HardDisk in lower case.""" + time = Column(Interval) class Organize(JoinedTableMixin, ActionWithMultipleDevices):