Error when creating a new election
After filling in all the fields on the create election form and submit it, I've got the HTTP 500 error below.
Thanks.
IntegrityError at /helios/elections/new
null value in column "short_name" violates not-null constraint
Request Method: POST
Request URL: http://127.0.0.1:8000/helios/elections/new
Django Version: 1.2.5
Exception Type: IntegrityError
Exception Value:
null value in column "short_name" violates not-null constraint
Exception Location:
/usr/lib/python2.6/site-packages/django/db/models/query.py in
get_or_create, line 391
Python Executable: /usr/bin/python
Python Version: 2.6.4
Python Path: ['/home/helios/helios/helios-server',
'/usr/lib/python2.6/site-packages/celery-2.2.4-py2.6.egg',
'/usr/lib/python2.6/site-packages/pyparsing-1.5.5-py2.6.egg',
'/usr/lib/python2.6/site-packages/kombu-1.0.3-py2.6.egg',
'/usr/lib/python2.6/site-packages/anyjson-0.3-py2.6.egg',
'/usr/lib/python2.6/site-packages/python_dateutil-1.5-py2.6.egg',
'/usr/lib/python2.6/site-packages/importlib-1.0.2-py2.6.egg',
'/usr/lib/python2.6/site-packages/amqplib-0.6.1-py2.6.egg',
'/usr/lib/python2.6/site-packages/django_celery-2.2.4-py2.6.egg',
'/usr/lib/python2.6/site-packages/django_picklefield-0.1.9-py2.6.egg',
'/usr/lib64/python26.zip', '/usr/lib64/python2.6',
'/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk',
'/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload',
'/usr/lib64/python2.6/site-packages',
'/usr/lib64/python2.6/site-packages/gtk-2.0',
'/usr/lib/python2.6/site-packages',
'/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info']
Server time: Fri, 25 Feb 2011 09:10:01 -0800
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/helios/elections/new
Django Version: 1.2.5
Python Version: 2.6.4
Installed Applications:
['django.contrib.contenttypes', 'django.contrib.sessions',
'django.contrib.sites', 'djcelery', 'auth', 'helios', 'server_ui']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Traceback:
File
"/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in
get_response
100. response = callback(request, callback_args,
**callback_kwargs) File
"/home/helios/helios/helios-server/auth/security/init.py"
in login_required_wrapper
75. return func(request, args, kw) File
"/home/helios/helios/helios-server/helios/views.py" in
election_new
142. election, created_p =
Election.get_or_create(election_params) File
"/home/helios/helios/helios-server/helios/models.py" in
get_or_create
118. return cls.objects.get_or_create(short_name =
kwargs['short_name'], defaults=kwargs) File
"/usr/lib/python2.6/site-packages/django/db/models/manager.py" in
get_or_create
135. return self.get_query_set().get_or_create(**kwargs) File
"/usr/lib/python2.6/site-packages/django/db/models/query.py" in
get_or_create
391. raise e
Exception Type: IntegrityError at /helios/elections/new
Exception Value: null value in column "short_name" violates
not-null constraint
Reported by Erick Nascimento · February 25th, 2011 @ 09:31 AM
No comments yet.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.