Re fixing transaction.rollback: What would be the preferred way to fix this? I haven't personally tested it (a coworker has and reports that it doesn't work), but BaseDatabaseWrapper.set_rollback requires that in_atomic_block be True when set_rollback is called, which is not the case in this example or in general, I think (I still don't entirely know what in_atomic_block is really supposed to mean). I could manually do get_connection(using).needs_rollback = False .
Once I know the preferred fix, I'll work on the patch. One thing I still don't understand is why needs_rollback was set to True in the first place in my simple example. Reading the attribute name naively, we don't really need to emit a db rollback at all, as the bad save never hit the db at all, as it failed in the model validations. (In practice, this doesn't matter too much, as there's no real harm in making unneeded-as-far-as-the-db-is-concerned rollback calls. Asking more in hopes of understanding what's going on better) Thanks for the help -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/671da620-cdd9-48ed-9645-258682874117%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
