Flagsmith/flagsmith
Auf GitHub ansehen500 when calling /api/v1/features/featurestates/{pk}/ with empty environment
Open
#6.597 geöffnet am 27. Jan. 2026
apigood first issue
Repository-Metriken
- Stars
- (3.475 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 3T 7h) (157 gemergte PRs in 30 T)
Beschreibung
Sentry Issue: FLAGSMITH-API-5GQ
AttributeError: 'NoneType' object has no attribute 'id'
(8 additional frame(s) were not displayed)
...
File "features/serializers.py", line 578, in validate_environment
if self.instance and self.instance.environment_id != environment.id: # type: ignore[union-attr]
Acceptance criteria
/api/v1/features/featurestates/{pk}/responds with HTTP 400 ifenvironmentis null in the payload.