diff options
| author | Justin Bronn <jbronn@gmail.com> | 2009-12-29 10:35:59 +0000 |
|---|---|---|
| committer | Justin Bronn <jbronn@gmail.com> | 2009-12-29 10:35:59 +0000 |
| commit | db867be91e10ef5f5f3ee929d92dc87454651895 (patch) | |
| tree | ed72162d0fd60b15f940d552a956b4aaa5c17b70 | |
| parent | 58bf653a26aae6ec466761c5d5933d1a5edfa641 (diff) | |
[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: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12023 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/gis/db/models/sql/query.py | 2 | ||||
| -rw-r--r-- | django/contrib/gis/tests/relatedapp/tests.py | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/django/contrib/gis/db/models/sql/query.py b/django/contrib/gis/db/models/sql/query.py index 094fc5815f..0785bebb13 100644 --- a/django/contrib/gis/db/models/sql/query.py +++ b/django/contrib/gis/db/models/sql/query.py @@ -229,7 +229,7 @@ class GeoQuery(sql.Query): if SpatialBackend.oracle 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)) else: values.extend(row[index_start:]) diff --git a/django/contrib/gis/tests/relatedapp/tests.py b/django/contrib/gis/tests/relatedapp/tests.py index ac53c03923..c776942f77 100644 --- a/django/contrib/gis/tests/relatedapp/tests.py +++ b/django/contrib/gis/tests/relatedapp/tests.py @@ -19,7 +19,6 @@ class RelatedGeoModelTest(unittest.TestCase): 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 @@ class RelatedGeoModelTest(unittest.TestCase): self.assertEqual(Point(lon, lat), c.location.point) @no_mysql - @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 |
