You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.09%. Comparing base (38ac162) to head (a45b8b8). ⚠️ Report is 9 commits behind head on main.
The reason will be displayed to describe this comment to others. Learn more.
Missing testserver in ALLOWED_HOSTS for local settings
The reset_local_database command uses Django REST Framework's APIClient which makes requests with Host: testserver (Django's default for test clients). However, local.py only adds ".ngrok.io", "127.0.0.1", and "localhost" to ALLOWED_HOSTS, not "testserver". Since DEBUG defaults to False in common.py and isn't overridden in .env-local or local.py, Django will validate the Host header and reject all APIClient requests with a DisallowedHost exception. The tests pass because test.py both sets DEBUG = True and adds "testserver" to ALLOWED_HOSTS, but running make reset with local settings will fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiIssue related to the REST APIfeatureNew feature or requestfront-endIssue related to the React Front End Dashboard
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make it easier to run Flagsmith locally.
Changes
make resetcommand that resets the database to a known state.make resetexampleReview effort: 2/5