mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-07-21 19:24:26 +02:00
Fix new device key update and group deletion bug
This commit is contained in:
parent
f4e77ab54e
commit
733307de8d
2 changed files with 4 additions and 4 deletions
|
@ -363,7 +363,7 @@ def grab_device_data(dev, q):
|
|||
"keys":keys
|
||||
}
|
||||
reddb=RedisDB(redopts)
|
||||
if len(json.loads(dev.sensors))<len(keys) and dev.sensors!=json.dumps(keys):
|
||||
if not dev.sensors or (len(json.loads(dev.sensors))<len(keys) and dev.sensors!=json.dumps(keys)):
|
||||
log.info("updating keys for device {}".format(dev.id))
|
||||
dev.sensors=json.dumps(keys)
|
||||
reddb.dev_create_keys()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue