#10594: distance(geom) results ambiguous when the PointField can be null -------------------------------+-------------------------------------------- Reporter: whiteinge | Owner: nobody Status: new | Milestone: Component: GIS | Version: SVN Keywords: distance queryset | Stage: Unreviewed Has_patch: 0 | -------------------------------+-------------------------------------------- Given the following GIS model:
{{{ class SomeModel(models.Model): location = models.PointField(null=True) <snip> }}} When populated with instances that both have and do not have location information, doing a {{{distance(geom)}}} query yields unexpected results. For example, {{{SomeModel.objects.distance(somePoint)}}} returns no results at all. {{{SomeModel.objects.filter(location__isnull=False).distance(somePoint)}}} works as expected. IMO, {{{distance(geom)}}} results that cannot calculate distance should simply return None. -- Ticket URL: <http://code.djangoproject.com/ticket/10594> Django <http://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 post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---