Skip to content
Browse files

Fixed #12344 -- Using `select_related()` on geographic fields with th…

…e Oracle spatial backend now works.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 4ab21fb commit a488589461582d60a41326cd8a6ab28b96a9e19a @jbronn jbronn committed
4 django/contrib/gis/db/models/sql/
@@ -191,8 +191,8 @@ def resolve_columns(self, row, fields=()):
if or getattr(self.query, '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):
- values.append(self.query.convert_values(value, field, self.connection))
+ for value, field in map(None, row[index_start:], fields):
+ values.append(self.query.convert_values(value, field, connection=self.connection))
return tuple(values)
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

0 comments on commit a488589

Please sign in to comment.
Something went wrong with that request. Please try again.