#30309: Remove hasattr reference in One-to-One documentation example -------------------------------+-------------------------------------- Reporter: David Beitey | Owner: nobody Type: Uncategorized | Status: closed Component: Documentation | Version: 2.2 Severity: Normal | Resolution: invalid Keywords: | Triage Stage: Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by felixxm): First of all described situation has nothing to do with examples in docs. Secondly I'm sorry but I strongly disagree with you, this is a completely different situation. IMO if related field is assigned but objects does not exists then `hasattr()` should raise `DoesNotExist` exception, because attribute is assigned to an object it is simply incorrect, `existence != correctness`. You can always start a new thread in the [https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum /django-developers django-developers] if you think that this should be changed. -- Ticket URL: <https://code.djangoproject.com/ticket/30309#comment:5> 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/065.f58d761e636fd8cf548deea5fc930dd4%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.