mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
only remove session if currently active
This commit is contained in:
parent
6bb24d8a16
commit
b43bba1d46
1 changed files with 4 additions and 3 deletions
|
@ -1217,6 +1217,7 @@ Return new path, relative to media dir."""
|
||||||
self.s.commit()
|
self.s.commit()
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
|
if self.s:
|
||||||
self.s.rollback()
|
self.s.rollback()
|
||||||
self.s.clear()
|
self.s.clear()
|
||||||
self.s.close()
|
self.s.close()
|
||||||
|
|
Loading…
Reference in a new issue