From 3f29f4fad61efc5ffc3b345956573e837ecf19c8 Mon Sep 17 00:00:00 2001 From: andrey-canon Date: Mon, 10 Dec 2018 18:01:47 -0500 Subject: [PATCH] logout_user returns now a json so object has no attribute 'json' --- rocketc/rocketc.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rocketc/rocketc.py b/rocketc/rocketc.py index 50a9aecd..ed4de9d5 100644 --- a/rocketc/rocketc.py +++ b/rocketc/rocketc.py @@ -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)