Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26785 closed Bug (fixed)

Oracle backend returns empty string instead of None for empty geometries

Reported by: Sergey Fedoseev Owned by: Sergey Fedoseev
Component: GIS Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gis.db.models.functions import Intersection
from test_app.models import City

City.objects.annotate(inter=Intersection('point', GEOSGeometry('POINT (0 0)', srid=4326))).values('inter')
<QuerySet [{'inter': u''}]>
from django.db import connection

c = connection.cursor()
c.execute('SELECT "TEST_APP_CITY"."ID", SDO_UTIL.TO_WKTGEOMETRY(SDO_GEOM.SDO_INTERSECTION("TEST_APP_CITY"."POINT", SDO_GEOMETRY(\'POINT(0 0)\', 4326), 0.05)) AS "INTER" FROM "TEST_APP_CITY"')
.fetchall()
[('1', None)]

Change History (5)

comment:1 by Sergey Fedoseev, 8 years ago

Owner: changed from nobody to Sergey Fedoseev
Status: newassigned

comment:2 by Sergey Fedoseev, 8 years ago

Has patch: set

comment:3 by Tim Graham, 8 years ago

Triage Stage: UnreviewedReady for checkin

comment:4 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In ea466506:

Fixed #26785 -- Made Oracle return None rather than empty string for empty geometries.

comment:5 by Tim Graham <timograham@…>, 8 years ago

In be1022d0:

[1.10.x] Fixed #26785 -- Made Oracle return None rather than empty string for empty geometries.

Backport of ea4665066b651e0e2730f2e2d85fcef9d7ac7966 from master

Note: See TracTickets for help on using tickets.
Back to Top