#26789: ORM produces query with NULL instead of empty geometry
----------------------------+--------------------------------------
     Reporter:  sir-sigurd  |                    Owner:  sir-sigurd
         Type:  Bug         |                   Status:  assigned
    Component:  GIS         |                  Version:  1.9
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Accepted
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+--------------------------------------

Comment (by jtiai):

 Root cause it that geometry value begin nothing is tested with clause {{{
 if not value }}}. Which in turn calls {{{ __len__ }}} on a geometry,
 having a following responses in different geometries:

 For an empty point number of coordinates is returned. In case of empty 0
 (zero) is returned (false).

 For a linestring empty tuple is returned {{{ () }}} (false)

 For an polygon empty tuple of tuple is returned {{{ ((),) }}} (true)

 For a geometry collection length of 0 (zero) is returned (false)

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.e61a57dd194622d1a85804bd281cab07%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to