]> asedeno.scripts.mit.edu Git - bluechips.git/blobdiff - bluechips/controllers/spend.py
brought up to date with latest sqlalchemy conventions
[bluechips.git] / bluechips / controllers / spend.py
index fd884536b1d02811ce0977c40bbbe8c9c9956831..1a1c34612091b888df800ebeacfba199fc631da3 100644 (file)
@@ -42,12 +42,12 @@ class SpendController(BaseController):
         # old one
         if id is None:
             e = model.Expenditure()
+            meta.Session.add(e)
         else:
             e = meta.Session.query(model.Expenditure).get(id)
         
         # Set the fields that were submitted
         update_sar(e, self.form_result)
-        meta.Session.save_or_update(e)
         
         if id is None:
             e.even_split()