Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: Current Version
-
Fix Version/s: TAG 2016/17 Sprint 1
-
Component/s: OIOIOI
-
Labels:
Description
Internal Server Error: /c/2a_rozne/admin/contests/contest/2a_rozne/delete/
Traceback (most recent call last):
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
return func(*args, **kwargs)
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/transaction.py", line 225, in __exit__
connection.commit()
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 173, in commit
self._commit()
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 142, in _commit
return self.connection.commit()
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 142, in _commit
return self.connection.commit()
IntegrityError: update or delete on table "problems_problem" violates foreign key constraint "gamification_problem_id_6c405b0a31bad73a_fk_problems_problem_id" on table "gamification_problemdifficulty"
DETAIL: Key (id)=(11080) is still referenced from table "gamification_problemdifficulty".
The solution is to add ON CASCADE DELETE in the Django models for gamification.
Traceback (most recent call last):
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
return func(*args, **kwargs)
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/transaction.py", line 225, in __exit__
connection.commit()
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 173, in commit
self._commit()
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 142, in _commit
return self.connection.commit()
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/users/sio2/sio2/venv/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 142, in _commit
return self.connection.commit()
IntegrityError: update or delete on table "problems_problem" violates foreign key constraint "gamification_problem_id_6c405b0a31bad73a_fk_problems_problem_id" on table "gamification_problemdifficulty"
DETAIL: Key (id)=(11080) is still referenced from table "gamification_problemdifficulty".
The solution is to add ON CASCADE DELETE in the Django models for gamification.
Issue Links
- is duplicated by
-
SIO-1849 Deleting contests does not work
Activity
Szymon Acedański
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | Next Sprint [ 12002 ] |
Szymon Acedański
made changes -
Szymon Pajzert
made changes -
Assignee | Szymon Pajzert [ szymonpajzert ] |
Szymon Acedański
made changes -
Fix Version/s | TAG 2016/17 Sprint 1 [ 12501 ] | |
Fix Version/s | Next Sprint [ 12002 ] |
Szymon Pajzert
made changes -
Status | New [ 10000 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Szymon Acedański
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
---|---|---|---|---|---|---|---|---|---|
|
38d 8h 10m | 1 | Szymon Pajzert | 2016-11-27 0:11 | |||||
|
849d 16h 25m | 1 | Szymon Acedański | 2019-03-26 16:36 |