From 44a755cb46a18fde5c88fe51b02c9d2b11243066 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 02 2015 11:03:02 +0000 Subject: Commit the new comment added to the issue earlier This will also avoid sending an email or updating the ticket git repo if the comment could not be saved in the database --- diff --git a/progit/lib/__init__.py b/progit/lib/__init__.py index 24af449..9739754 100644 --- a/progit/lib/__init__.py +++ b/progit/lib/__init__.py @@ -150,7 +150,7 @@ def add_issue_comment(session, issue, comment, user, ticketfolder): ) session.add(issue_comment) # Make sure we won't have SQLAlchemy error before we create the repo - session.flush() + session.commit() progit.lib.git.update_git_ticket( issue, repo=issue.project, ticketfolder=ticketfolder)