diff options
author | Magnus Hagander | 2015-08-14 10:34:39 +0000 |
---|---|---|
committer | Magnus Hagander | 2015-08-14 10:34:39 +0000 |
commit | d20c6971576e998625e226fac6acdee283cd3549 (patch) | |
tree | 3322073e227e460d71b5f31b5a3316c92c001fec /pgcommitfest/commitfest/views.py | |
parent | c6e940c1acc2e6c41fe809213a9b9c96a7ce63c2 (diff) |
Ensure duplicate patches aren't created when an invalid msgid is entered
Diffstat (limited to 'pgcommitfest/commitfest/views.py')
-rw-r--r-- | pgcommitfest/commitfest/views.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py index ddc579a..6e86743 100644 --- a/pgcommitfest/commitfest/views.py +++ b/pgcommitfest/commitfest/views.py @@ -282,6 +282,9 @@ def newpatch(request, cfid): form._errors['threadmsgid'] = form.error_class(('Selected thread did not exist in the archives',)) except Exception: form._errors['threadmsgid'] = form.error_class(('An error occurred looking up the thread in the archives.',)) + # In this case, we have created a patch - delete it. This causes a agp in id's, but it should + # not happen very often. If we successfully attached to it, we will have already returned. + patch.delete() else: form = NewPatchForm() |