Browse Source

Fix device cache renew

Hal De 4 years ago
parent
commit
607910f648
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/app.py

+ 2 - 1
app/app.py

@@ -557,7 +557,8 @@ async def refreshStatesCache():
   return len(app.cache['ustates'])
   return len(app.cache['ustates'])
 
 
 async def refreshDevicesCache():
 async def refreshDevicesCache():
-  aors = await amiPJSIPShowAors()
+  _reply = await amiPJSIPShowAors()
+  aors = _reply['data']
   app.cache['devices'] = list(aors.keys())
   app.cache['devices'] = list(aors.keys())
   return len(app.cache['devices'])
   return len(app.cache['devices'])