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

Enforce unique OrderRounds #26

Conversation

peteruithoven
Copy link
Member

Fixes: #25

@peteruithoven
Copy link
Member Author

I'm running into this issue:

sqlite3.IntegrityError: UNIQUE constraint failed: ordering_orderround.collect_datetime

I'm assuming this is because there are existing OrderRounds with not equal dates.

@peteruithoven
Copy link
Member Author

When I removed the Order round with equal dates the migrate went successfully.

@peteruithoven
Copy link
Member Author

@rikva
Copy link
Collaborator

rikva commented Mar 25, 2019

I'm assuming this fails because unit tests create OrderRounds on the same date (now)?
https://github.com/rikva/voko/blob/master/webapp/ordering/tests/test_models.py#L60
https://github.com/rikva/voko/blob/master/webapp/ordering/tests/factories.py#L17

Yeah it looks like the collect_datetime is autofilled and it's not unique.

@peteruithoven
Copy link
Member Author

I'm closing this one, it's probably not the right approach.

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

Successfully merging this pull request may close these issues.

Prevent similar OrderRounds
2 participants