Mercurial > kallithea
diff rhodecode/controllers/changeset.py @ 1749:8ecc6b8229a5 beta
commit less models
- models don't do any commits(with few exceptions)
- all db transactions should be handled by higher level modules like controllers, celery tasks
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 02 Dec 2011 22:31:13 +0200 |
parents | 7d1fc253549e |
children | f28dc032adf0 |
line wrap: on
line diff
--- a/rhodecode/controllers/changeset.py Fri Dec 02 00:15:26 2011 +0200 +++ b/rhodecode/controllers/changeset.py Fri Dec 02 22:31:13 2011 +0200 @@ -280,7 +280,7 @@ revision=revision, f_path=request.POST.get('f_path'), line_no=request.POST.get('line')) - Session().commit() + Session.commit() return redirect(h.url('changeset_home', repo_name=repo_name, revision=revision)) @@ -290,7 +290,7 @@ owner = lambda : co.author.user_id == c.rhodecode_user.user_id if h.HasPermissionAny('hg.admin', 'repository.admin')() or owner: ChangesetCommentsModel().delete(comment=co) - Session().commit() + Session.commit() return True else: raise HTTPForbidden()