fix: accept roskosmos corporation scope alias
All checks were successful
CI/CD Pipeline / Code Quality Checks (push) Successful in 2m22s
CI/CD Pipeline / Run Tests (push) Successful in 2m28s
CI/CD Pipeline / Build Docker Images (push) Successful in 2m24s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 1s
CI/CD Pipeline / Deploy to Server (push) Successful in 1s
All checks were successful
CI/CD Pipeline / Code Quality Checks (push) Successful in 2m22s
CI/CD Pipeline / Run Tests (push) Successful in 2m28s
CI/CD Pipeline / Build Docker Images (push) Successful in 2m24s
CI/CD Pipeline / Push to Gitea Registry (push) Successful in 1s
CI/CD Pipeline / Deploy to Server (push) Successful in 1s
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Query serializers for organization analytics endpoints."""
|
||||
|
||||
from apps.organization.models import CorporationScope
|
||||
from apps.organization.scope_utils import SCOPE_ALIASES
|
||||
from rest_framework import serializers
|
||||
|
||||
|
||||
@@ -17,8 +18,8 @@ class AliasChoiceField(serializers.ChoiceField):
|
||||
|
||||
|
||||
class DashboardQuerySerializer(serializers.Serializer):
|
||||
corporation_scope = serializers.ChoiceField(
|
||||
choices=CorporationScope.choices, required=False
|
||||
corporation_scope = AliasChoiceField(
|
||||
choices=CorporationScope.choices, aliases=SCOPE_ALIASES, required=False
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user