Closed tatianacv closed 3 years ago
Please add the erroneous SQL statement and the error message.
'Cannot add or update a child row: a foreign key constraint fails (heroku_4ac11fb2946b4e7
.categorizations
, CONSTRAINT categorizations_ibfk_7
FOREIGN KEY (sha
) REFERENCES commits
(sha
))')
@tatianacv please capture the SQL statement that is causing this error. Django has an ORM that translates OO code into SQL. It should have a debug option to output any generated SQL statements.
Per our recent discussion, the route for this form would be as follows:
http://app/categorizations/add?commit=5
Add a categorization for commit with ID 5
Per recent discussion, remove the commit entry form element from this form because it will be (instead) a query parameter as above.
Fixed insertion to form in commit e75faa16f891dd6d0280d1ba7b1a9a126a841a5a
Remove the sha from the categorizations form in commit 1f9e246c5f481574b3fd20ac9bca24dd64bf86e3
Getting a SQL error for inserting the form