#16594: Missing altitude (z) on Point on admin interface for geodjango
------------------------------------+------------------------
Reporter: info@… | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: GIS
Version: 1.3 | Severity: Normal
Resolution: | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------+------------------------
Changes (by aaugustin):
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted
Comment:
I can reproduce this with PostgreSQL and PostGIS.
I wrote a model that contains this field: `geom3 =
django.contrib.gis.db.models.GeometryField(dim=3)`.
I can create an object with the value `POINT(1 2 3)` in the admin. When I
edit this object again, the field contains `POINT (1.0000000000000000
2.0000000000000000)` — no `3.0000000000000000`. If I try to save the
object, I get this traceback:
{{{
Traceback:
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in
get_response
111. response = callback(request,
*callback_args, **callback_kwargs)
File "/usr/lib/python2.6/site-packages/django/contrib/admin/options.py" in
wrapper
307. return self.admin_site.admin_view(view)(*args,
**kwargs)
File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in
_wrapped_view
93. response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/views/decorators/cache.py"
in _wrapped_view_func
79. response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/contrib/admin/sites.py" in
inner
197. return view(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in
_wrapper
28. return bound_func(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in
_wrapped_view
93. response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in
bound_func
24. return func(self, *args2, **kwargs2)
File "/usr/lib/python2.6/site-packages/django/db/transaction.py" in inner
217. res = func(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/contrib/admin/options.py" in
change_view
982. self.save_model(request, new_object, form,
change=True)
File "/usr/lib/python2.6/site-packages/django/contrib/admin/options.py" in
save_model
665. obj.save()
File "/usr/lib/python2.6/site-packages/django/db/models/base.py" in save
460. self.save_base(using=using, force_insert=force_insert,
force_update=force_update)
File "/usr/lib/python2.6/site-packages/django/db/models/base.py" in
save_base
526. rows =
manager.using(using).filter(pk=pk_val)._update(values)
File "/usr/lib/python2.6/site-packages/django/db/models/query.py" in
_update
491. return query.get_compiler(self.db).execute_sql(None)
File "/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py"
in execute_sql
869. cursor = super(SQLUpdateCompiler,
self).execute_sql(result_type)
File "/usr/lib/python2.6/site-packages/django/db/models/sql/compiler.py"
in execute_sql
735. cursor.execute(sql, params)
File "/usr/lib/python2.6/site-packages/django/db/backends/util.py" in
execute
34. return self.cursor.execute(sql, params)
File "/usr/lib/python2.6/site-
packages/django/db/backends/postgresql_psycopg2/base.py" in execute
44. return self.cursor.execute(query, args)
Exception Type: IntegrityError at /admin/myapp/mymodel/1/
Exception Value: new row for relation "myapp_mymodel" violates check
constraint "enforce_dims_geom3"
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/16594#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.