show code in web
This commit is contained in:
parent
bf5cae5f96
commit
083ce4e660
|
@ -124,6 +124,7 @@ class Device(Thing):
|
|||
allocated = db.Column(Boolean, default=False)
|
||||
allocated.comment = "device is allocated or not."
|
||||
code = db.Column(db.CIText(), nullable=True, unique=True, default=create_code)
|
||||
code.comment = "device have a unique code."
|
||||
|
||||
_NON_PHYSICAL_PROPS = {
|
||||
'id',
|
||||
|
|
|
@ -66,6 +66,7 @@ class Device(Thing):
|
|||
sku = SanitizedStr(description=m.Device.sku.comment)
|
||||
image = URL(description=m.Device.image.comment)
|
||||
allocated = Boolean(description=m.Device.allocated.comment)
|
||||
code = SanitizedStr(description=m.Device.code.comment)
|
||||
|
||||
@pre_load
|
||||
def from_actions_to_actions_one(self, data: dict):
|
||||
|
|
Reference in New Issue