Skip to content

Commit 1ef7a40

Browse files
committed
Handle patches that were closed after the move
1 parent 9747f24 commit 1ef7a40

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pgcommitfest/commitfest/migrations/0018_undo_pg19_final_close.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ def undo_pg19_final_close(apps, schema_editor):
5757
# deletion must happen first because poc_enforce_maxoneoutcome_idx
5858
# only allows one non-moved poc per patch.
5959
original_status = new_poc.status
60+
original_leavedate = new_poc.leavedate
6061
new_poc.delete()
6162

6263
old_poc.status = original_status
63-
old_poc.leavedate = None
64+
old_poc.leavedate = original_leavedate
6465
old_poc.save()
6566

6667
# Delete the PatchHistory entries for these moves

0 commit comments

Comments
 (0)