Opened 6 months ago
Closed 6 months ago
#35567 closed Bug (invalid)
when i give add,update,delete in site it give IntegrityError at /admin/sites/site/add/ FOREIGN KEY constraint failed
Reported by: | Balavignesh | Owned by: | |
---|---|---|---|
Component: | Error reporting | Version: | 5.0 |
Severity: | Normal | Keywords: | |
Cc: | Balavignesh | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
add by go into django/admin/site and give add delete or update it give like this when i come back it same your changes is successfully done but there is no changes done
IntegrityError at /admin/socialaccount/socialapp/add/
FOREIGN KEY constraint failed
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/socialaccount/socialapp/add/
Django Version: 5.0.3
Exception Type: IntegrityError
Exception Value:
FOREIGN KEY constraint failed
Exception Location: C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\db\backends\base\base.py, line 299, in _commit
Raised during: django.contrib.admin.options.add_view
Python Executable: C:\Program Files\Python312\python.exe
Python Version: 3.12.2
Python Path:
['C:
Users
Vicky
OneDrive
Desktop
IPL2
IPL
IPL_SITE',
'C:
Program Files
Python312
python312.zip',
'C:
Program Files
Python312
DLLs',
'C:
Program Files
Python312
Lib',
'C:
Program Files
Python312',
'C:
Users
Vicky
AppData
Roaming
Python
Python312
site-packages',
'C:
Program Files
Python312
Lib
site-packages']
Server time: Sat, 29 Jun 2024 10:05:12 +0000 Internal Server Error: /admin/socialaccount/socialapp/add/
Traceback (most recent call last):
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\db\backends\base\base.py", line 299, in _commit
return self.connection.commit()
sqlite3.IntegrityError: FOREIGN KEY constraint failed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\core\handlers\exception.py", line 55, in inner
response = get_response(request)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\core\handlers\base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, callback_kwargs)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\contrib\admin\options.py", line 716, in wrapper
return self.admin_site.admin_view(view)(*args, kwargs)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\utils\decorators.py", line 188, in _view_wrapper
result = _process_exception(request, e)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\utils\decorators.py", line 186, in _view_wrapper
response = view_func(request, *args, kwargs)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\views\decorators\cache.py", line 80, in _view_wrapper
response = view_func(request, *args, kwargs)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\contrib\admin\sites.py", line 240, in inner
return view(request, *args, kwargs)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\contrib\admin\options.py", line 1945, in add_view
return self.changeform_view(request, None, form_url, extra_context)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\utils\decorators.py", line 48, in _wrapper
return bound_method(*args, kwargs)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\utils\decorators.py", line 188, in _view_wrapper
result = _process_exception(request, e)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\utils\decorators.py", line 186, in _view_wrapper
response = view_func(request, *args, kwargs)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\contrib\admin\options.py", line 1803, in changeform_view
with transaction.atomic(using=router.db_for_write(self.model)):
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\db\transaction.py", line 263, in exit
connection.commit()
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\utils\asyncio.py", line 26, in inner
return func(*args, kwargs)
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\db\backends\base\base.py", line 323, in commit
self._commit()
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\db\backends\base\base.py", line 298, in _commit
with debug_transaction(self, "COMMIT"), self.wrap_database_errors:
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\db\utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\Vicky\AppData\Roaming\Python\Python312\site-packages\django\db\backends\base\base.py", line 299, in _commit
return self.connection.commit()
django.db.utils.IntegrityError: FOREIGN KEY constraint failed
[29/Jun/2024 15:35:12] "POST /admin/socialaccount/socialapp/add/ HTTP/1.1" 500 143983
Attachments (2)
Change History (3)
by , 6 months ago
Attachment: | django error.PNG added |
---|
by , 6 months ago
Attachment: | django error2.PNG added |
---|
comment:1 by , 6 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
If you're having trouble understanding how Django works, see TicketClosingReasons/UseSupportChannels for ways to get help. Trac is not a support channel.