settings is not a dict you goob
parent
f333a9ebac
commit
4c70ddf22f
|
@ -30,7 +30,7 @@ def run_command(request, command, req_type):
|
|||
raise CommandNotFound
|
||||
except Exception as e:
|
||||
response = {"error": e.__class__.__name__, "error_message": str(e)}
|
||||
if settings["DEBUG"]:
|
||||
if getattr(settings, "DEBUG", False):
|
||||
traceback.print_exception(type(e), e, e.__traceback__, file=sys.stderr)
|
||||
|
||||
return JsonResponse(response, safe=False)
|
||||
|
|
Loading…
Reference in New Issue