Fixing HID field to accepts null values
This commit is contained in:
parent
16560462fa
commit
713452e4e1
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Reference in a new issue