On Thu, Jan 15, 2009 at 11:11 PM, Collin Grady <col...@collingrady.com> wrote: > On Thu, Jan 15, 2009 at 2:09 PM, Jan Bednařík <jan.bedna...@gmail.com> wrote: >> That should not happen. >> >> instance.delete() >> instance.save() >> >> should raise ObjectDoesNotExist exception. Any other behavior is bug. > > Why? You have a perfectly valid object instance, and you're then saving it.
Because I deleted that object. Delete method should be non-reversible (except in transactions) like "del" statement in Python. Or anybody knows any reason, why it should be reversible? If I try to call save() or any other method on deleted object, than it's just and only my mistake and I should get exceptions. But quiet undelete effect of save() method can cause lot of "hard to find" bugs in final app. Especially if probably nobody is expecting something like that. Jan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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 -~----------~----~----~----~------~----~------~--~---