Ticket #10594: fix_null_geometry_querysets.diff

File fix_null_geometry_querysets.diff, 610 bytes (added by yourcelf, 6 years ago)

Prevent null geometry fields from resulting in empty querysets

  • contrib/gis/db/models/sql/query.py

     
    233233        extra selection objects into Geometry and Distance objects.
    234234        TODO: Make converted objects 'lazy' for less overhead.
    235235        """
     236        if value == None:
     237            return value
     238
    236239        if SpatialBackend.oracle:
    237240            # Running through Oracle's first.
    238241            value = super(GeoQuery, self).convert_values(value, field or GeomField())
Back to Top