Opened 16 years ago
Last modified 16 years ago
#10040 closed
GeoDjango: 'Save As' on spatial record (OSMGeoAdmin) creates broken copy *AND* corrupts the original record — at Initial Version
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | GIS | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Traceback for original record in Admin after SaveAs failed and created a dud copy:
Environment:
Request Method: GET
Request URL: http://url/admin/geo/borders/136/
Django Version: 1.0.2 final
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.flatpages',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.gis',
'vovo.geo']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware')
Traceback:
File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response
- response = callback(request, *callback_args, callback_kwargs)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in root
- return self.model_page(request, *url.split('/', 2))
File "/usr/lib/python2.5/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
- response = view_func(request, *args, kwargs)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in model_page
- return admin_obj(request, rest_of_url)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in call
- return self.change_view(request, unquote(url))
File "/usr/lib/python2.5/site-packages/django/db/transaction.py" in _commit_on_success
- res = func(*args, kw)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in change_view
- form = ModelForm(instance=obj)
File "/usr/lib/python2.5/site-packages/django/forms/models.py" in init
- object_data = model_to_dict(instance, opts.fields, opts.exclude)
File "/usr/lib/python2.5/site-packages/django/forms/models.py" in model_to_dict
- data[f.name] = f.value_from_object(instance)
File "/usr/lib/python2.5/site-packages/django/db/models/fields/init.py" in value_from_object
- return getattr(obj, self.attname)
File "/usr/lib/python2.5/site-packages/django/contrib/gis/db/models/proxy.py" in get
- geom = self._klass(geom_value)
File "/usr/lib/python2.5/site-packages/django/contrib/gis/geos/base.py" in init
- g = from_hex(geo_input, len(geo_input))
File "/usr/lib/python2.5/site-packages/django/contrib/gis/geos/prototypes/errcheck.py" in check_geom
- raise GEOSException('Error encountered checking Geometry returned from GEOS C function "%s".' % func.name)
Exception Type: GEOSException at /admin/geo/borders/136/
Exception Value: Error encountered checking Geometry returned from GEOS C function "GEOSGeomFromHEX_buf".
The copy suffered much the same problem.
If I've not missed anything substantial (which is quite an If, honestly) I'd call something that causes data loss to be Critical.