From 3ce0c255571684655a8b291f3564cd3928d306f8 Mon Sep 17 00:00:00 2001 From: Matthew Elwell Date: Thu, 9 May 2024 11:40:20 +0100 Subject: [PATCH] Fix issue not returning identity overrides --- api/features/managers.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/api/features/managers.py b/api/features/managers.py index a285e89c2a61..9e8f0336fb00 100644 --- a/api/features/managers.py +++ b/api/features/managers.py @@ -37,7 +37,14 @@ def get_live_feature_states( environment ) latest_version_uuids = [efv.uuid for efv in latest_versions] - qs_filter &= Q(environment_feature_version__uuid__in=latest_version_uuids) + + # Note that since identity overrides aren't part of the versioning system, + # we need to make sure we also return them here. We can still then subsequently + # filter them out with the `additional_filters` if needed. + qs_filter &= Q( + Q(environment_feature_version__uuid__in=latest_version_uuids) + | Q(identity__isnull=False) + ) else: qs_filter &= Q( live_from__isnull=False,