Mbonea commited on
Commit
e23c4c3
·
1 Parent(s): e0be833

json response i forgot to commit this in the last commit

Browse files
Files changed (1) hide show
  1. App/Android/Android.py +4 -1
App/Android/Android.py CHANGED
@@ -53,7 +53,10 @@ class AndroidClient:
53
  async def is_user_active(self, phone_number):
54
  """Retrieve all active users."""
55
  response = await self.client.get("/users/active")
56
- active_users = response.json()["active_users"]
 
 
 
57
 
58
  for user in active_users:
59
  if phone_number == user["phone"]:
 
53
  async def is_user_active(self, phone_number):
54
  """Retrieve all active users."""
55
  response = await self.client.get("/users/active")
56
+ data = response.json()
57
+
58
+ if "active_users" in data:
59
+ active_users = data["active_users"]
60
 
61
  for user in active_users:
62
  if phone_number == user["phone"]: