Refactor code quality issues (#2001)

This commit is contained in:
Aksh Gupta
2021-03-16 23:43:02 +05:30
committed by GitHub
parent eae55e4b5a
commit 88ba7ab53a
18 changed files with 33 additions and 33 deletions

View File

@@ -48,7 +48,7 @@ def page_not_found(request, exception):
except (AttributeError, IndexError):
pass
else:
if isinstance(message, str) or isinstance(message, Promise):
if isinstance(message, (str, Promise)):
exception_repr = str(message)
context = {
'request_path': request.path,