Skip to content

Commit f6c61e7

Browse files
committed
Fix bug setting committer
1 parent 4c4a2c6 commit f6c61e7

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

pgcommitfest/commitfest/views.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,18 @@ def close(request, patchid, status):
10431043
)
10441044

10451045
if status == "committed":
1046+
if poc.is_open:
1047+
# Needs to be done before the next if condition, so the committer
1048+
# that's set there is set on the correct poc.
1049+
in_progress_cf = CommitFest.get_in_progress()
1050+
if in_progress_cf is not None:
1051+
poc = patch.move(
1052+
poc.commitfest,
1053+
in_progress_cf,
1054+
request.user,
1055+
allow_move_to_in_progress=True,
1056+
)
1057+
10461058
committer = get_object_or_404(Committer, user__username=request.GET["c"])
10471059
if committer != poc.patch.committer:
10481060
# Committer changed!
@@ -1054,16 +1066,6 @@ def close(request, patchid, status):
10541066
what="Changed committer to %s" % committer,
10551067
).save_and_notify(prevcommitter=prevcommitter)
10561068

1057-
if poc.is_open:
1058-
in_progress_cf = CommitFest.get_in_progress()
1059-
if in_progress_cf is not None:
1060-
poc = patch.move(
1061-
poc.commitfest,
1062-
in_progress_cf,
1063-
request.user,
1064-
allow_move_to_in_progress=True,
1065-
)
1066-
10671069
poc.status = PatchOnCommitFest.STATUS_COMMITTED
10681070

10691071
status_mapping = {

0 commit comments

Comments
 (0)