Skip to content

Commit

Permalink
Merge pull request #67 from eduNEXT/and/PE-102
Browse files Browse the repository at this point in the history
Remove json() call
  • Loading branch information
ericfab179 committed Dec 11, 2018
2 parents 1659b91 + 3f29f4f commit a4da535
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions rocketc/rocketc.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,12 +759,9 @@ def logout_user(self, request=None, suffix=None):
login_token = user_data.get("authToken")
user_id = user_data.get("userId")
response = api.logout_user(user_id, login_token)
try:
response = response.json()
if response.get("status") == "success":
cache.delete(key)
return Response(status=202)
except AttributeError:
return Response(status=503)

if response.get("status") == "success":
cache.delete(key)
return Response(status=202)

return Response(status=404)

0 comments on commit a4da535

Please sign in to comment.