backend
backend copied to clipboard
Add `foreign_key_constraint` to Submission to convert to error instead of crashing
In find_or_create_submission
Due to race condition when the find_or_create_submission
is called in very fast succession. Only one of the invocation will succeed in creating a new row in the db, the rest will fail with unique constraint error.
Relevant error: