#16537: layermapping spatial ref check not checking against alternate DB -------------------------------+---------------------------- Reporter: shifflett.shane@… | Owner: nobody Type: Bug | Status: new Milestone: | Component: GIS Version: 1.3 | Severity: Normal Keywords: | Triage Stage: Unreviewed Has patch: 1 | Easy pickings: 1 UI/UX: 0 | -------------------------------+---------------------------- django/contrib/gis/utils/layermapping.py uses alternate database to save geometries however when checking the SRID against the SPATIAL REF table it does not check against an alternate database if the user specifies one. For a user to experience this error they must have two databases and the default database cannot store shape data.
issue occurs in django/contrib/gis/utils/layermapping.py line 432 OLD CODE (SRID lookup will fail if user has an alternate database storing shape data): target_srs = SpatialRefSys.objects.get(srid=self.geo_field.srid).srs PROPOSED FIX (SRID lookup succeeds and functions similar to SAVE function): target_srs = SpatialRefSys.objects.using(self.using).get(srid=self.geo_field.srid).srs -- Ticket URL: <https://code.djangoproject.com/ticket/16537> 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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.