♻️(backend) align Application model field with is_active convention

Most models in the project use `is_active` rather than `active`.
The Application model was not aligned with this convention.

Rename the field and add a migration to standardize the naming.
Update related tests accordingly.

This change should not introduce breaking changes for external
applications.
This commit is contained in:
lebaudantoine
2026-03-11 16:01:43 +01:00
parent f57db0acc8
commit ca4494c09e
9 changed files with 35 additions and 16 deletions
@@ -203,7 +203,7 @@ class ApplicationJWTAuthentication(BaseJWTAuthentication):
logger.warning("Application not found: %s", client_id)
raise exceptions.AuthenticationFailed("Application not found.") from e
if not application.active:
if not application.is_active:
logger.warning(
"Inactive application attempted authentication: %s", client_id
)
+1 -1
View File
@@ -61,7 +61,7 @@ class ApplicationViewSet(viewsets.ViewSet):
except models.Application.DoesNotExist as e:
raise drf_exceptions.AuthenticationFailed("Invalid credentials") from e
if not application.active:
if not application.is_active:
raise drf_exceptions.AuthenticationFailed("Application is inactive")
if not check_password(client_secret, application.client_secret):