is_dirty() in the transactions middleware blocks commit for Postgre
|Reported by:||Jeffrey||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.0|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
In its default operation Postgre makes a shadow copy of a table for reading, and this persists until you explicitly commit your transaction. However, the TransactionsMiddleware class only calls commit when transaction.is_dirty() returns true. If you only read from the database, commit will never get called.
Possibly the is_dirty() check should be bypassed (or perhaps always return True) for postgres.