Sfoglia il codice sorgente

callback template implementaion

Hal De 4 anni fa
parent
commit
b746f1ee7c
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      app/app.py

+ 2 - 1
app/app.py

@@ -1052,7 +1052,8 @@ class DeviceCallback(Resource):
     else:
       row = await db.fetch_one(query='SELECT url FROM callback_urls WHERE device = :device',
                                values={'device': device})
-      url = row['url']
+      if row is not None:
+        url = row['url']
     return successCallbackURL(device, url)
 
 manager.connect()