🚨(backend) handle new checks introduced in Pylint v3.2.0
Pylint 3.2.0 introduced a new check `possibly-used-before-assignment`, which ensures variables are defined regardless of conditional statements. Some if/else branches were missing defaults. These have been fixed.
This commit is contained in:
committed by
aleb_the_flash
parent
04717fd629
commit
e0739689e6
@@ -23,6 +23,8 @@ def exception_handler(exc, context):
|
||||
detail = exc.message
|
||||
elif hasattr(exc, "messages"):
|
||||
detail = exc.messages
|
||||
else:
|
||||
detail = ""
|
||||
|
||||
exc = drf_exceptions.ValidationError(detail=detail)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user