#11053: access to OneToOneField when null=True should return None instead of raising DoesNotExist -------------------------------------------+-------------------------------- Reporter: Harm Geerts <hgee...@osso.nl> | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: SVN Keywords: | Stage: Unreviewed Has_patch: 1 | -------------------------------------------+-------------------------------- {{{ class Place(models.Model): name = models.CharField(max_length=50)
class UndergroundBar(models.Model): place = models.OneToOneField(Place, null=True) }}} Django behaves differently with access to the OneToOneField depending on which side of the relation is used. Currently UndergroundBar.place will return None while Place.undergroundbar raises DoesNotExist. -- Ticket URL: <http://code.djangoproject.com/ticket/11053> 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 -~----------~----~----~----~------~----~------~--~---