diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 091222da..5b9ba304 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -51,13 +51,13 @@ class Device(Thing): internally for software; users should not use this. """ type = Column(Unicode(STR_SM_SIZE), nullable=False) - hid = Column(Unicode(), check_lower('hid'), unique=True) + hid = Column(Unicode(), check_lower('hid'), unique=False) hid.comment = """The Hardware ID (HID) is the unique ID traceability systems use to ID a device globally. This field is auto-generated from Devicehub using literal identifiers from the device, so it can re-generated *offline*. """ + HID_CONVERSION_DOC - model = Column(Unicode, check_lower('model')) + model = Column(Unicode(), check_lower('model')) model.comment = """The model of the device in lower case. The model is the unambiguous, as technical as possible, denomination diff --git a/ereuse_devicehub/resources/device/schemas.py b/ereuse_devicehub/resources/device/schemas.py index 16f2acce..2eddfdc1 100644 --- a/ereuse_devicehub/resources/device/schemas.py +++ b/ereuse_devicehub/resources/device/schemas.py @@ -20,7 +20,7 @@ from ereuse_devicehub.resources.user import schemas as s_user class Device(Thing): __doc__ = m.Device.__doc__ id = Integer(description=m.Device.id.comment, dump_only=True) - hid = SanitizedStr(lower=True, dump_only=True, description=m.Device.hid.comment) + hid = SanitizedStr(lower=True, description=m.Device.hid.comment) tags = NestedOn('Tag', many=True, collection_class=OrderedSet,