Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.1.X] Fixed #12344 -- Using `select_related()` on geographic fields…

… with the Oracle spatial backend now works.

Backport of r12022 from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit db867be91e10ef5f5f3ee929d92dc87454651895 1 parent 58bf653
@jbronn jbronn authored
2  django/contrib/gis/db/models/sql/
@@ -229,7 +229,7 @@ def resolve_columns(self, row, fields=()):
if or getattr(self, 'geo_values', False):
# We resolve the rest of the columns if we're on Oracle or if
# the `geo_values` attribute is defined.
- for value, field in izip(row[index_start:], fields):
+ for value, field in map(None, row[index_start:], fields):
values.append(self.convert_values(value, field))
2  django/contrib/gis/tests/relatedapp/
@@ -19,7 +19,6 @@ def test01_setup(self):
loc = Location.objects.create(point=Point(lon, lat))
c = City.objects.create(name=name, state=state, location=loc)
- @no_oracle # TODO: Fix select_related() problems w/Oracle and pagination.
def test02_select_related(self):
"Testing `select_related` on geographic models (see #7126)."
qs1 = City.objects.all()
@@ -34,7 +33,6 @@ def test02_select_related(self):
self.assertEqual(Point(lon, lat), c.location.point)
- @no_oracle # Pagination problem is implicated in this test as well.
def test03_transform_related(self):
"Testing the `transform` GeoQuerySet method on related geographic models."
# All the transformations are to state plane coordinate systems using
Please sign in to comment.
Something went wrong with that request. Please try again.