Oracle backend returns empty string instead of None for empty geometries
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()
Change History
(5)
Owner: |
changed from nobody to Sergey Fedoseev
|
Status: |
new → assigned
|
Triage Stage: |
Unreviewed → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
PR