Ticket #12344: select_related_fix_v2.diff

File select_related_fix_v2.diff, 1.9 KB (added by jbronn, 5 years ago)
  • django/contrib/gis/db/models/sql/compiler.py

     
    191191        if self.connection.ops.oracle or getattr(self.query, 'geo_values', False):
    192192            # We resolve the rest of the columns if we're on Oracle or if
    193193            # the `geo_values` attribute is defined.
    194             for value, field in izip(row[index_start:], fields):
    195                 values.append(self.query.convert_values(value, field, self.connection))
     194            for value, field in map(None, row[index_start:], fields):
     195                values.append(self.query.convert_values(value, field, connection=self.connection))
    196196        else:
    197197            values.extend(row[index_start:])
    198198        return tuple(values)
  • django/contrib/gis/tests/relatedapp/tests.py

     
    1919            loc = Location.objects.create(point=Point(lon, lat))
    2020            c = City.objects.create(name=name, state=state, location=loc)
    2121
    22     @no_oracle # TODO: Fix select_related() problems w/Oracle and pagination.
    2322    def test02_select_related(self):
    2423        "Testing `select_related` on geographic models (see #7126)."
    2524        qs1 = City.objects.all()
     
    3433                self.assertEqual(Point(lon, lat), c.location.point)
    3534
    3635    @no_mysql
    37     @no_oracle # Pagination problem is implicated in this test as well.
    3836    def test03_transform_related(self):
    3937        "Testing the `transform` GeoQuerySet method on related geographic models."
    4038        # All the transformations are to state plane coordinate systems using
Back to Top