From 0219f08444d8840a65cdb08a18a897f2777cd0f5 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Fri, 6 Feb 2015 12:13:22 +0100 Subject: [PATCH] Stop using "added self" in history entries Instead include the actual username. Makes it easier to work with in the history views, and is also probably more proper english. --- pgcommitfest/commitfest/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py index 3e0dcd1..3268b7e 100644 --- a/pgcommitfest/commitfest/views.py +++ b/pgcommitfest/commitfest/views.py @@ -472,11 +472,11 @@ def reviewer(request, cfid, patchid, status): if status=='become' and not is_reviewer: patch.reviewers.add(request.user) patch.set_modified() - PatchHistory(patch=patch, by=request.user, what='Added self as reviewer').save() + PatchHistory(patch=patch, by=request.user, what='Added %s as reviewer' % request.user.username).save() elif status=='remove' and is_reviewer: patch.reviewers.remove(request.user) patch.set_modified() - PatchHistory(patch=patch, by=request.user, what='Removed self from reviewers').save() + PatchHistory(patch=patch, by=request.user, what='Removed %s from reviewers' % request.user.username).save() return HttpResponseRedirect('../../') @login_required @@ -495,11 +495,11 @@ def committer(request, cfid, patchid, status): if status=='become' and not is_committer: patch.committer = committer patch.set_modified() - PatchHistory(patch=patch, by=request.user, what='Added self as committer').save() + PatchHistory(patch=patch, by=request.user, what='Added %s as committer' % request.user.username).save() elif status=='remove' and is_committer: patch.committer = None patch.set_modified() - PatchHistory(patch=patch, by=request.user, what='Removed self from committers').save() + PatchHistory(patch=patch, by=request.user, what='Removed %s from committers' % request.user.username).save() patch.save() return HttpResponseRedirect('../../') -- 2.39.5