summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-15 13:20:33 +0200
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-10-15 13:20:33 +0200
commit25d5189f3a3df361d503e224d89e4ca7531b2d18 (patch)
tree02384106654851cc8d9e8204041ec11aa6908329
parent520420556ad9f2871cd8c5910645193508cb4082 (diff)
Add missing commit() calls for DB connections
-rw-r--r--db/models.py4
1 files changed, 4 insertions, 0 deletions
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)