You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I tried to add an entry to Zone table, I get the an error message (see below). I have several model classes. It seems like I only get this error if my model has primary_key=True.
model with the problem
class Zone(models.Model):
name = models.CharField(max_length=20, primary_key=True)
File "/home/npacadm/joan_env2/lib/python2.7/site-packages/django/db/backends/utils.py" in execute
self.db.validate_no_broken_transaction()
File "/home/npacadm/joan_env2/lib/python2.7/site-packages/django/db/backends/base/base.py" in validate_no_broken_transaction
"An error occurred in the current transaction. You can't "
Exception Type: TransactionManagementError at /admin/inventory/zone/add/
Exception Value: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
The text was updated successfully, but these errors were encountered:
When I tried to add an entry to Zone table, I get the an error message (see below). I have several model classes. It seems like I only get this error if my model has primary_key=True.
model with the problem
class Zone(models.Model):
name = models.CharField(max_length=20, primary_key=True)
error message
Environment:
Request Method: POST
Request URL: http://icbsgps01-dev:8001/admin/inventory/zone/add/
Django Version: 1.8.11
Python Version: 2.7.5
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.staticfiles',
'nested_admin',
'rest_framework',
'rest_framework_extensions',
'papriqa.release_manifest',
'papriqa.sw_validation',
'papriqa.alarm_reg',
'papriqa.inventory',
'import_export',
'session_security',
'simple_audit')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'session_security.middleware.SessionSecurityMiddleware',
'simple_audit.middleware.TrackingRequestOnThreadLocalMiddleware')
Traceback:
File "/home/npacadm/joan_env2/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
Exception Type: TransactionManagementError at /admin/inventory/zone/add/
Exception Value: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
The text was updated successfully, but these errors were encountered: