Commit d03254b1 authored by Giorgos Korfiatis's avatar Giorgos Korfiatis
Browse files

Set a project application REPLACED only when PENDING

Application state has historical significance:
we need to keep track which have been APPROVED/DENIED.
parent d6594dad
......@@ -1381,12 +1381,13 @@ def submit_application(**kw):
precursor = kw['precursor_application']
if precursor is not None:
precursor.state = ProjectApplication.REPLACED
precursor.save()
application.chain = precursor.chain
else:
if precursor is None:
application.chain = new_chain()
else:
application.chain = precursor.chain
if precursor.state == ProjectApplication.PENDING:
precursor.state = ProjectApplication.REPLACED
precursor.save()
application.save()
application.resource_policies = resource_policies
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment