fix alerts
This commit is contained in:
@@ -380,7 +380,11 @@ def createShareModel(request, model_id): # pragma: no cover
|
||||
|
||||
class JSONResponse(HttpResponse):
|
||||
def __init__(self, data, **kwargs):
|
||||
content = JSONRenderer().render(data)
|
||||
try:
|
||||
content = JSONRenderer().render(data)
|
||||
except ValueError:
|
||||
content = ''
|
||||
|
||||
kwargs['content_type'] = 'application/json'
|
||||
super(JSONResponse, self).__init__(content, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user