This commit is contained in:
Cayo Puigdefabregas 2022-12-20 11:06:41 +01:00
parent 31b62a2d81
commit 2bb6b13e07
1 changed files with 7 additions and 6 deletions

View File

@ -753,12 +753,13 @@ class Device(Thing):
return ""
def get_from_db(self):
try:
from modules.device.utils import get_from_db
if 'property_hid' in app.blueprints.keys():
try:
from modules.device.utils import get_from_db
return get_from_db(self)
except Exception:
pass
return get_from_db(self)
except Exception:
pass
if not self.hid:
return
@ -771,7 +772,7 @@ class Device(Thing):
).first()
def set_hid(self):
if 'property_hid' not in app.blueprints.keys():
if 'property_hid' in app.blueprints.keys():
try:
from modules.device.utils import set_hid