iommirocks / iommi

Your first pick for a django power cord
http://iommi.rocks
BSD 3-Clause "New" or "Revised" License
688 stars 47 forks source link

Added atomic support to middleware #470

Closed viktor2097 closed 11 months ago

viktor2097 commented 11 months ago

The previous iommi middleware implementation would raise an error if any database connection had ATOMIC_REQUESTS enabled.

This commit changes the middleware to use transaction savepoints instead, so atomicity is retained while still allowing iommi to intercept and render responses.

Changes:

I added tests to ensure that the transactions are working as expected.