>
> The correct exception is risen when you try to save it:
>
>  >>> t.save()
>  Traceback (most recent call last):
>  ...
>  IntegrityError: 20100212_thing.owner_id may not be NULL
>
> How can you not understand that the DoesNotExist exception above is
> risen too early? It is a bug!
>

Are you saying that the correct behaviour is to throw an IntegrityError as
opposed to a DoesNotExist on accessing the field?

If so, why would accessing a value on an unsaved instance (which by
definition isn't in the database yet) be an IntegrityError rather than a
DoesNotExist as a result of a lookup?

It's clearly a design decision. You are free to disagree with that decision,
but it's not a bug - it's behaving as designed (and documented).

Gary

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to