learningequality / learningequality/studio
IntegrityError: FOREIGN KEY constraint failed
Open
Nobody has claimed this yet.
P1 - important
TODO: needs reproduced
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
Sentry Issue: STUDIO-ED1
IntegrityError: FOREIGN KEY constraint failed
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "django/db/backends/sqlite3/base.py", line 423, in execute
return Database.Cursor.execute(self, query, params)
IntegrityError: FOREIGN KEY constraint failed
(14 additional frame(s) were not displayed)
...
File "django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "django/db/backends/sqlite3/base.py", line 423, in execute
return Database.Cursor.execute(self, query, params)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Django SQLite execution path in django/db/backends/sqlite3/base.py and the wrapper in django/db/backends/utils.py. The report does not identify the application operation or foreign-key relationship involved, so trace the caller beyond these frames and reproduce the failure. Done means the violating operation is identified and covered by a verified fix or regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python, sqlite
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100