fix
This commit is contained in:
parent
31b62a2d81
commit
2bb6b13e07
|
@ -753,12 +753,13 @@ class Device(Thing):
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
def get_from_db(self):
|
def get_from_db(self):
|
||||||
try:
|
if 'property_hid' in app.blueprints.keys():
|
||||||
from modules.device.utils import get_from_db
|
try:
|
||||||
|
from modules.device.utils import get_from_db
|
||||||
|
|
||||||
return get_from_db(self)
|
return get_from_db(self)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not self.hid:
|
if not self.hid:
|
||||||
return
|
return
|
||||||
|
@ -771,7 +772,7 @@ class Device(Thing):
|
||||||
).first()
|
).first()
|
||||||
|
|
||||||
def set_hid(self):
|
def set_hid(self):
|
||||||
if 'property_hid' not in app.blueprints.keys():
|
if 'property_hid' in app.blueprints.keys():
|
||||||
try:
|
try:
|
||||||
from modules.device.utils import set_hid
|
from modules.device.utils import set_hid
|
||||||
|
|
||||||
|
|
Reference in New Issue