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 = db.Column(Boolean, default=False)
|
||||||
allocated.comment = "device is allocated or not."
|
allocated.comment = "device is allocated or not."
|
||||||
code = db.Column(db.CIText(), nullable=True, unique=True, default=create_code)
|
code = db.Column(db.CIText(), nullable=True, unique=True, default=create_code)
|
||||||
|
code.comment = "device have a unique code."
|
||||||
|
|
||||||
_NON_PHYSICAL_PROPS = {
|
_NON_PHYSICAL_PROPS = {
|
||||||
'id',
|
'id',
|
||||||
|
|
|
@ -66,6 +66,7 @@ class Device(Thing):
|
||||||
sku = SanitizedStr(description=m.Device.sku.comment)
|
sku = SanitizedStr(description=m.Device.sku.comment)
|
||||||
image = URL(description=m.Device.image.comment)
|
image = URL(description=m.Device.image.comment)
|
||||||
allocated = Boolean(description=m.Device.allocated.comment)
|
allocated = Boolean(description=m.Device.allocated.comment)
|
||||||
|
code = SanitizedStr(description=m.Device.code.comment)
|
||||||
|
|
||||||
@pre_load
|
@pre_load
|
||||||
def from_actions_to_actions_one(self, data: dict):
|
def from_actions_to_actions_one(self, data: dict):
|
||||||
|
|
Reference in New Issue