Skip to content
Snippets Groups Projects
Commit 21e29e46 authored by Fredrik Jonsson's avatar Fredrik Jonsson
Browse files

Only perform state transition on applicant save if there is a higer state.

parent 27609b6b
No related branches found
No related tags found
No related merge requests found
......@@ -494,14 +494,17 @@ class ApplicantSubmissionEditView(BaseSubmissionEditView):
)
action = set(self.request.POST.keys()) & set(self.transitions.keys())
transition = self.transitions[action.pop()]
self.object.perform_transition(
transition.target,
self.request.user,
request=self.request,
notify=not (revision or submitting_proposal), # Use the other notification
)
try:
transition = self.transitions[action.pop()]
except KeyError:
pass
else:
self.object.perform_transition(
transition.target,
self.request.user,
request=self.request,
notify=not (revision or submitting_proposal), # Use the other notification
)
return HttpResponseRedirect(self.get_success_url())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment