[flatpak] fix -> not handling empty array API response when filling the app data asynchronously

This commit is contained in:
Vinicius Moreira
2020-08-31 10:19:17 -03:00
parent 16eb8445fb
commit fede4fb210

View File

@@ -47,6 +47,9 @@ class FlatpakAsyncDataLoader(Thread):
if res and res.text:
data = res.json()
if not data:
self.logger.warning("No data returned for id {} ({})".format(self.app.id, self.app.name))
else:
if not self.app.version:
self.app.version = data.get('version')