[Django] #26785: Oracle backend returns empty string instead of None for empty geometries

35 views
Skip to first unread message

Django

unread,
Jun 21, 2016, 5:05:48 AM6/21/16
to django-...@googlegroups.com
#26785: Oracle backend returns empty string instead of None for empty geometries
----------------------------+--------------------
Reporter: sir-sigurd | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------
{{{#!python
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')
}}}
{{{#!python
<QuerySet [{'inter': u''}]>
}}}

{{{#!python
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()
}}}
{{{#!python
[('1', None)]
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26785>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 21, 2016, 5:06:16 AM6/21/16
to django-...@googlegroups.com
#26785: Oracle backend returns empty string instead of None for empty geometries
----------------------------+--------------------------------------
Reporter: sir-sigurd | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by sir-sigurd):

* owner: nobody => sir-sigurd
* needs_better_patch: => 0
* status: new => assigned
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26785#comment:1>

Django

unread,
Jun 21, 2016, 5:13:57 AM6/21/16
to django-...@googlegroups.com
#26785: Oracle backend returns empty string instead of None for empty geometries
----------------------------+--------------------------------------
Reporter: sir-sigurd | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by sir-sigurd):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/6816 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/26785#comment:2>

Django

unread,
Jun 21, 2016, 11:05:00 AM6/21/16
to django-...@googlegroups.com
#26785: Oracle backend returns empty string instead of None for empty geometries
----------------------------+---------------------------------------------

Reporter: sir-sigurd | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+---------------------------------------------
Changes (by timgraham):

* stage: Unreviewed => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/26785#comment:3>

Django

unread,
Jun 21, 2016, 2:07:15 PM6/21/16
to django-...@googlegroups.com
#26785: Oracle backend returns empty string instead of None for empty geometries
----------------------------+---------------------------------------------
Reporter: sir-sigurd | Owner: sir-sigurd
Type: Bug | Status: closed
Component: GIS | Version: 1.9
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+---------------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"ea4665066b651e0e2730f2e2d85fcef9d7ac7966" ea466506]:
{{{
#!CommitTicketReference repository=""
revision="ea4665066b651e0e2730f2e2d85fcef9d7ac7966"
Fixed #26785 -- Made Oracle return None rather than empty string for empty
geometries.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26785#comment:4>

Django

unread,
Jun 21, 2016, 9:00:32 PM6/21/16
to django-...@googlegroups.com
#26785: Oracle backend returns empty string instead of None for empty geometries
----------------------------+---------------------------------------------
Reporter: sir-sigurd | Owner: sir-sigurd
Type: Bug | Status: closed
Component: GIS | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------+---------------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"be1022d0e771b6f7e60edc3aec596de04608996f" be1022d0]:
{{{
#!CommitTicketReference repository=""
revision="be1022d0e771b6f7e60edc3aec596de04608996f"
[1.10.x] Fixed #26785 -- Made Oracle return None rather than empty string
for empty geometries.

Backport of ea4665066b651e0e2730f2e2d85fcef9d7ac7966 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26785#comment:5>

Reply all
Reply to author
Forward
0 new messages