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

Getting form from all application types in MigrateCommand class.

parent 533cac62
No related branches found
No related tags found
No related merge requests found
...@@ -58,7 +58,12 @@ class MigrateCommand(BaseCommand): ...@@ -58,7 +58,12 @@ class MigrateCommand(BaseCommand):
submission.page = FUND submission.page = FUND
ROUND = Round.objects.get(title=self.ROUND_NAME) ROUND = Round.objects.get(title=self.ROUND_NAME)
submission.round = ROUND submission.round = ROUND
FORM = RoundForm.objects.get(round=ROUND) if self.APPLICATION_TYPE == "request":
FORM = RoundForm.objects.get(round=ROUND)
elif self.APPLICATION_TYPE == "concept":
FORM = RoundForm.objects.filter(round=ROUND)[0]
elif self.APPLICATION_TYPE == "proposal":
FORM = RoundForm.objects.filter(round=ROUND)[1]
submission.form_fields = FORM.form.form_fields submission.form_fields = FORM.form.form_fields
elif self.CONTENT_TYPE == "lab": elif self.CONTENT_TYPE == "lab":
LAB = LabType.objects.get(title=self.LAB_NAME) LAB = LabType.objects.get(title=self.LAB_NAME)
......
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