From bb50ff889ee14a5cf092f3375df5e38e0e732a65 Mon Sep 17 00:00:00 2001 From: Charles Leifer Date: Tue, 13 May 2014 21:25:40 -0500 Subject: [PATCH] Just use self.commit() --- peewee.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peewee.py b/peewee.py index e19210bff..27b7d2259 100644 --- a/peewee.py +++ b/peewee.py @@ -2541,7 +2541,7 @@ def last_insert_id(self, cursor, model): schema, meta.db_table, meta.primary_key.db_column)) result = cursor.fetchone()[0] if self.get_autocommit(): - self.get_conn().commit() + self.commit() return result def get_indexes_for_table(self, table):