From 25d5189f3a3df361d503e224d89e4ca7531b2d18 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 15 Oct 2015 13:20:33 +0200 Subject: Add missing commit() calls for DB connections --- db/models.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'db') diff --git a/db/models.py b/db/models.py index 17f9681..5fa9ffc 100644 --- a/db/models.py +++ b/db/models.py @@ -87,6 +87,7 @@ def _general_get(kwargs_dict, clazz, sql_select, row_conversion_fn=_no_row_conve finally: cur.close() finally: + conn.commit() return_connection(conn) def _general_filter(kwargs_dict, clazz, sql_select, row_conversion_fn=_no_row_conversion): @@ -112,6 +113,7 @@ def _general_filter(kwargs_dict, clazz, sql_select, row_conversion_fn=_no_row_co finally: cur.close() finally: + conn.commit() return_connection(conn) def _general_list(clazz, sql_select, row_conversion_fn=_no_row_conversion): @@ -130,6 +132,7 @@ def _general_list(clazz, sql_select, row_conversion_fn=_no_row_conversion): finally: cur.close() finally: + conn.commit() return_connection(conn) def _run_sql(sql, params, fetch_one=False): @@ -145,4 +148,5 @@ def _run_sql(sql, params, fetch_one=False): finally: cur.close() finally: + conn.commit() return_connection(conn) -- cgit v1.2.1