From 1a12159c282d4b045e1541d4d25b263951bbf996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 18 Jul 2022 00:46:30 +0200 Subject: [PATCH] Add enum overrides --- api/config/settings/local.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/config/settings/local.py b/api/config/settings/local.py index de4002782..37eac1903 100644 --- a/api/config/settings/local.py +++ b/api/config/settings/local.py @@ -132,6 +132,12 @@ SPECTACULAR_SETTINGS = { "OAUTH2_AUTHORIZATION_URL": "/authorize", "OAUTH2_TOKEN_URL": "/api/v1/oauth/token/", "PREPROCESSING_HOOKS": ["config.schema.custom_preprocessing_hook"], + "ENUM_NAME_OVERRIDES": { + "FederationChoiceEnum": "funkwhale_api.federation.models.TYPE_CHOICES", + "ReportTypeEnum": "funkwhale_api.moderation.models.REPORT_TYPES", + "PrivacyLevelEnum": "funkwhale_api.common.fields.PRIVACY_LEVEL_CHOICES", + "LibraryPrivacyLevelEnum": "funkwhale_api.music.models.LIBRARY_PRIVACY_LEVEL_CHOICES", + }, } if env.bool("WEAK_PASSWORDS", default=False):