﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21029	Schema editors leak transaction state on exception	Michal Petrucha	nobody	"When a schema editor is used as a context manager and an uncaught exception is raised within its block, `BaseDatabaseSchemaEditor`'s `__exit__` method doesn't call `atomic.__exit__`, which leaves the transaction opened when entering the block open.

I'm going to open a pull request shortly with a simple patch which does fix things for me, but I'm not sure about its correctness and I have no idea how to test this. An alternative approach might be to store an instance of `Atomic` as an attribute in `BaseDatabaseSchemaEditor` and call its `__enter__` and `__exit__` instead of creating separate instances; I have no idea whether that makes any difference or not."	Bug	closed	Migrations	dev	Normal	fixed			Accepted	1	0	0	0	0	0
