summaryrefslogtreecommitdiff
path: root/controller.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--controller.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/controller.py b/controller.py
index ea8be5b..5056306 100644
--- a/controller.py
+++ b/controller.py
@@ -193,6 +193,7 @@ class ConstAdd:
else:
e.prev = None
+ web.ctx.orm.commit()
raise web.seeother("/const/%s" % e.id)
else:
return render(self.template, form = f)
@@ -219,7 +220,7 @@ class ConstAdd:
cur = self.get_expense()
if cur.id is None: # empty
- session.expunge(cur)
+ web.ctx.orm..expunge(cur)
else:
filter = sql.or_(CE.next == cur, filter)
filter = sql.and_(filter, CE.id != cur.id)