diff --git a/models.py b/models.py index b5ff2a84..b4bd902b 100644 --- a/models.py +++ b/models.py @@ -593,7 +593,7 @@ def todata(self): 'report_perf': self.check_report_perf.decode('utf-8'), 'report_a11y': self.check_report_a11y.decode('utf-8'), 'report_stand': self.check_report_stand.decode('utf-8'), - 'data': self.json_check_data.decode('utf-8') + 'data': self.json_check_data }] return result diff --git a/utils.py b/utils.py index 1fe77672..d034533b 100644 --- a/utils.py +++ b/utils.py @@ -99,23 +99,11 @@ def test(global_translation, site, test_type=None): print(global_translation('TEXT_SITE_REVIEW'), reviews) - json_data = '' - try: - json_data = the_test_result[1] - json_data = json.dumps(json_data) - except json.decoder.JSONDecodeError: - json_data = '' - except TypeError: - json_data = '' - except RecursionError: - json_data = '' - - jsondata = str(json_data).encode('utf-8') # --//-- - + json_data = the_test_result[1] site_test = SiteTests(site_id=site[0], type_of_test=test_type, rating=rating, test_date=datetime.now(), - json_check_data=jsondata).todata() + json_check_data=json_data).todata() return site_test except Exception as ex: # pylint: disable=broad-exception-caught