From a111348341b2dba76042e4daf1ceda5a6efe0c67 Mon Sep 17 00:00:00 2001 From: Dan Braghis <dan.braghis@torchbox.com> Date: Thu, 8 Mar 2018 14:54:24 +0000 Subject: [PATCH] Save the form fields along with the submission --- .../funds/management/commands/migrate_rr_applications.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opentech/apply/funds/management/commands/migrate_rr_applications.py b/opentech/apply/funds/management/commands/migrate_rr_applications.py index ab9a1cd2c..810ad0bb4 100644 --- a/opentech/apply/funds/management/commands/migrate_rr_applications.py +++ b/opentech/apply/funds/management/commands/migrate_rr_applications.py @@ -10,7 +10,7 @@ from django.db.utils import IntegrityError from opentech.apply.categories.models import Category, Option from opentech.apply.categories.categories_seed import CATEGORIES -from opentech.apply.funds.models import ApplicationSubmission, FundType, Round +from opentech.apply.funds.models import ApplicationSubmission, FundType, Round, RoundForm User = get_user_model() @@ -218,7 +218,7 @@ STREAMFIELD_MAP = { FUND = FundType.objects.get(title='Rapid Response') ROUND = Round.objects.get(title='Rapid Response open round') - +FORM = RoundForm.objects.get(round=ROUND) class Command(BaseCommand): help = "Rapid response migration script. Requires a source JSON file." @@ -258,6 +258,7 @@ class Command(BaseCommand): submission.page = FUND submission.round = ROUND form_data = {} + submission.form_fields = FORM.form.form_fields for field in node: if field in STREAMFIELD_MAP: -- GitLab