From f8de0c1ccfb2d4fe2a40539cc807d5340cc0ec04 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Mon, 2 Mar 2020 21:56:59 +1300 Subject: [PATCH] fix api check --- core/forks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/forks.py b/core/forks.py index 25cb6d5d..c1cbb91c 100644 --- a/core/forks.py +++ b/core/forks.py @@ -21,9 +21,6 @@ def api_check(r, params, rem_params): logger.debug('Response received') raise - if isinstance(json_data, str): - return rem_params, False - try: json_data = json_data['data'] except KeyError: @@ -31,6 +28,8 @@ def api_check(r, params, rem_params): logger.debug('Response received: {}'.format(json_data)) raise else: + if isinstance(json_data, str): + return rem_params, False json_data = json_data.get('data', json_data) try: