Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeatureState.DoesNotExist: FeatureState matching query does not exist. #5044

Closed
sentry-io bot opened this issue Jan 28, 2025 · 1 comment · Fixed by #5045 or #5050
Closed

FeatureState.DoesNotExist: FeatureState matching query does not exist. #5044

sentry-io bot opened this issue Jan 28, 2025 · 1 comment · Fixed by #5045 or #5050

Comments

@sentry-io
Copy link

sentry-io bot commented Jan 28, 2025

Sentry Issue: FLAGSMITH-API-51W

KeyError: 'feature_state'
  File "django/db/models/fields/related_descriptors.py", line 218, in __get__
    rel_obj = self.field.get_cached_value(instance)
  File "django/db/models/fields/mixins.py", line 15, in get_cached_value
    return instance._state.fields_cache[cache_name]

FeatureState.DoesNotExist: FeatureState matching query does not exist.
(7 additional frame(s) were not displayed)
...
  File "audit/tasks.py", line 92, in create_audit_log_from_historical_record
    environment, project = instance.get_environment_and_project()
  File "core/models.py", line 141, in get_environment_and_project
    environment, project = self._get_environment(), self._get_project()
  File "features/models.py", line 1136, in _get_environment
    return self.feature_state.environment

Failed to execute task 'tasks.create_audit_log_from_historical_record', with id 342993195. Exception: FeatureState matching query does not exist.
@gagantrivedi gagantrivedi linked a pull request Jan 28, 2025 that will close this issue
4 tasks
@gagantrivedi
Copy link
Member

It still fails for multivariate feature state values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant