Code

Move db.commit() call from handle_xmlrpc() to individual methods, so actions can...
[roundup.git] / roundup / xmlrpc.py
index f41c6d6f5905cfde0fb8ce966f6346abac677892..4e0d19ad38be7f42ef49c0e405aa8d1a48fe6e64 100644 (file)
@@ -120,6 +120,7 @@ class RoundupInstance:
         # do the actual create
         try:
             result = cl.create(**props)
+            self.db.commit()
         except (TypeError, IndexError, ValueError), message:
             raise UsageError, message
         return result
@@ -135,9 +136,11 @@ class RoundupInstance:
                 raise Unauthorised('Permission to edit %s of %s denied'%
                                    (p, designator))
         try:
-            return cl.set(itemid, **props)
+            result = cl.set(itemid, **props)
+            self.db.commit()
         except (TypeError, IndexError, ValueError), message:
             raise UsageError, message
+        return result
 
 
     builtin_actions = {'retire': actions.Retire}