-
Notifications
You must be signed in to change notification settings - Fork 32
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
Setting user based flag conditions prevents migrations running on a fresh database #96
Comments
@moaxey Hmm, I don't think you should need to do anything in migrations. This looks like a bug in Django-Flags with the user condition validator being used in the Django checks. The other observation I have is, with a boolean condition that is But the traceback suggests to me that we should be handling model errors in the checks better than we are. I'll see if I can get a fix in. |
Thankyou @willbarton |
We ran into the same issue trying to deploy a new user column. Luckily our
I'll take a look to see if I can come up with a fix, though I'm not sure what the desired behaviour should be. |
@willbarton I think I'd catch the If that seems like a decent solution I'll work on the PR |
My CI always starts with a fresh database. This user condition gave me the desired behaviour, and worked when adding the Django flags app and migrating from an existing database:
But the user condition would be tested before the user table was created when running migrations on a new database.
Do I need to add these flags in a migration themselves instead of in code?
The text was updated successfully, but these errors were encountered: