From 0bc71c7146ff024882bf428e1736f9b28fd01220 Mon Sep 17 00:00:00 2001
From: Ole Laursen
Date: Fri, 16 Mar 2012 17:22:33 +0000
Subject: [PATCH] Fix problem with concurrent posts as reported in #813 by
preventing accidentally submitting a post twice (with Javascript) and
modifying the move-old-files-to-archive code to not move the files away if
they belong to the same submission as the one we're accepting (this mitigates
a concurrent post to at least not end up with a non-existing draft). -
Legacy-Id: 4112
---
ietf/submit/utils.py | 5 +++--
ietf/templates/submit/draft_status.html | 11 +++++++++++
ietf/templates/submit/last_confirmation_step.html | 11 +++++++++++
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/ietf/submit/utils.py b/ietf/submit/utils.py
index 6be5c759e..38fcd5ab2 100644
--- a/ietf/submit/utils.py
+++ b/ietf/submit/utils.py
@@ -154,8 +154,9 @@ def perform_postREDESIGN(request, submission):
e.save()
# clean up old files
- from ietf.idrfc.expire import move_draft_files_to_archive
- move_draft_files_to_archive(draft, prev_rev)
+ if prev_rev != draft.rev:
+ from ietf.idrfc.expire import move_draft_files_to_archive
+ move_draft_files_to_archive(draft, prev_rev)
# automatic state changes
state_change_msg = ""
diff --git a/ietf/templates/submit/draft_status.html b/ietf/templates/submit/draft_status.html
index 7ea66fb8b..30bd84ee3 100644
--- a/ietf/templates/submit/draft_status.html
+++ b/ietf/templates/submit/draft_status.html
@@ -245,3 +245,14 @@ The IETF is an organized activity of the Internet
Please send problem reports to ietf-action@ietf.org.