From 15932e3f7c5839ca4c198e142b9ac5eb74d99467 Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Tue, 4 Feb 2025 11:00:05 -0500 Subject: [PATCH] Set feature flag base on setting (#15808) --- awx/settings/development.py | 5 +++++ awx/settings/production.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/awx/settings/development.py b/awx/settings/development.py index 68fa75ceb8..d38c2759e2 100644 --- a/awx/settings/development.py +++ b/awx/settings/development.py @@ -119,3 +119,8 @@ from .application_name import set_application_name set_application_name(DATABASES, CLUSTER_HOST_ID) # NOQA del set_application_name + +# Set the value of any feature flags that are defined in the local settings +for feature in list(FLAGS.keys()): # noqa: F405 + if feature in locals(): + FLAGS[feature][0]['value'] = locals()[feature] # noqa: F405 diff --git a/awx/settings/production.py b/awx/settings/production.py index fa74bc7fb7..e340de4fbb 100644 --- a/awx/settings/production.py +++ b/awx/settings/production.py @@ -104,3 +104,8 @@ from .application_name import set_application_name set_application_name(DATABASES, CLUSTER_HOST_ID) # NOQA del set_application_name + +# Set the value of any feature flags that are defined in the local settings +for feature in list(FLAGS.keys()): # noqa: F405 + if feature in locals(): + FLAGS[feature][0]['value'] = locals()[feature] # noqa: F405