Skip to content

Commit ea038fa

Browse files
committed
Merge pull request pytest-dev#21 from Downtownapp/master
Hotfix: savepoints
2 parents f2a3ef9 + 3121797 commit ea038fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

peewee_async.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -781,15 +781,15 @@ def __init__(self, db, sid=None):
781781

782782
@asyncio.coroutine
783783
def commit(self):
784-
yield from _run_sql('RELEASE SAVEPOINT %s;' % self.quoted_sid)
784+
yield from _run_sql(self.db, 'RELEASE SAVEPOINT %s;' % self.quoted_sid)
785785

786786
@asyncio.coroutine
787787
def rollback(self):
788-
yield from _run_sql('ROLLBACK TO SAVEPOINT %s;' % self.quoted_sid)
788+
yield from _run_sql(self.db, 'ROLLBACK TO SAVEPOINT %s;' % self.quoted_sid)
789789

790790
@asyncio.coroutine
791791
def __aenter__(self):
792-
yield from _run_sql('SAVEPOINT %s;' % self.quoted_sid)
792+
yield from _run_sql(self.db, 'SAVEPOINT %s;' % self.quoted_sid)
793793
return self
794794

795795
@asyncio.coroutine

0 commit comments

Comments
 (0)