mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[flatpak] fix -> not handling empty array API response when filling the app data asynchronously
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user