🚨(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:
antoine lebaud
2024-05-31 12:29:58 +02:00
committed by aleb_the_flash
parent 04717fd629
commit e0739689e6
2 changed files with 5 additions and 0 deletions

View File

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