diff --git a/rhodecode/model/changeset_status.py b/rhodecode/model/changeset_status.py --- a/rhodecode/model/changeset_status.py +++ b/rhodecode/model/changeset_status.py @@ -312,6 +312,7 @@ class ChangesetStatusModel(BaseModel): for st in cur_statuses: st.version += 1 Session().add(st) + Session().flush() def _create_status(user, repo, status, comment, revision, pull_request): new_status = ChangesetStatus() diff --git a/rhodecode/model/pull_request.py b/rhodecode/model/pull_request.py --- a/rhodecode/model/pull_request.py +++ b/rhodecode/model/pull_request.py @@ -530,7 +530,7 @@ class PullRequestModel(BaseModel): ) # we commit early at this point. This has to do with a fact # that before queries do some row-locking. And because of that - # we need to commit and finish transation before below validate call + # we need to commit and finish transaction before below validate call # that for large repos could be long resulting in long row locks Session().commit()