settings is not a dict you goob

doc_update
Joey Hines 2019-01-31 17:10:28 -06:00
parent f333a9ebac
commit 4c70ddf22f
1 changed files with 1 additions and 1 deletions

View File

@ -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)