TransactionManagementError raised when data is not changed
|Reported by:||als||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
According to Django documentation, a commit_manually decorator would raise TransactionManagementError if decorated block changes data and doesn't commit() or rollback().
Actually, TransactionManagementError is raised when no data is changed, but some SELECT statements were executed by model managers.
If that is intended behavior, Django documentation should reflect it, but it would be better if SELECT statements could run without commit or rollback.
Change History (5)
comment:1 Changed 3 years ago by claudep
- Component changed from Uncategorized to Documentation
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
- Type changed from Uncategorized to Cleanup/optimization