0001-dataviz-ignore-bad-statistics-provider-result-71963.patch
combo/apps/dataviz/utils.py | ||
---|---|---|
1 |
import json |
|
2 | ||
1 | 3 |
import django |
2 | 4 |
from django.conf import settings |
3 | 5 | |
... | ... | |
31 | 33 |
if response.status_code != 200: |
32 | 34 |
continue |
33 | 35 | |
34 |
result = response.json() |
|
36 |
try: |
|
37 |
result = response.json() |
|
38 |
except json.JSONDecodeError: |
|
39 |
continue |
|
35 | 40 |
if isinstance(result, dict): |
36 | 41 |
result = result['data'] # detect new api |
37 | 42 | |
38 |
- |