Support administrative area extraction orders
Created by: das-g
#21 (closed) (pull request #50) only handles extraction orders with
- newly created excerpts
- existing user-defined excerpts
Choosing a predefined country/region (administrative area) from the list and clicking 'Create excerpt export request') results in the following error:
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/excerptexport/create/
Django Version: 1.7.4
Python Version: 3.4.0
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'excerptexport')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Traceback:
File "/var/www/eda/environment/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
111. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
21. return view_func(request, *args, **kwargs)
File "/var/www/eda/projects/excerptexport/views.py" in create_excerpt_export
45. orderer = request.user
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/manager.py" in manager_method
92. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/query.py" in create
372. obj.save(force_insert=True, using=self.db)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/base.py" in save
589. force_update=force_update, update_fields=update_fields)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/base.py" in save_base
617. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/base.py" in _save_table
698. result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/base.py" in _do_insert
731. using=using, raw=raw)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/manager.py" in manager_method
92. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/query.py" in _insert
921. return query.get_compiler(using=using).execute_sql(return_id)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/sql/compiler.py" in execute_sql
919. for sql, params in self.as_sql():
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/sql/compiler.py" in as_sql
877. for obj in self.query.objs
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/sql/compiler.py" in <listcomp>
877. for obj in self.query.objs
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/sql/compiler.py" in <listcomp>
875. for f in fields
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/fields/related.py" in get_db_prep_save
1735. return self.related_field.get_db_prep_save(value, connection=connection)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/fields/__init__.py" in get_db_prep_save
627. prepared=False)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/fields/__init__.py" in get_db_prep_value
907. value = self.get_prep_value(value)
File "/var/www/eda/environment/lib/python3.4/site-packages/django/db/models/fields/__init__.py" in get_prep_value
915. return int(value)
Exception Type: ValueError at /excerptexport/create/
Exception Value: invalid literal for int() with base 10: 'eu'