Browse Source

no data handling

kunickyd 3 years ago
parent
commit
ff00a0cf1e
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app.py

+ 3 - 0
app.py

@@ -52,6 +52,9 @@ def get_account_assets(accountId): #TODO: add validation and error handling
     response = Assets()
     response.assets = []
 
+    if len(data) < 1:
+        return '', 204
+
     for asset in data:
         response.assets.append(Asset(asset.asset_id, asset.balance))