diff --git a/opentech/apply/funds/management/commands/migration_base.py b/opentech/apply/funds/management/commands/migration_base.py index 3014aef133d68a26a3d0a050969d1c9c055d37e4..f43491dde4764f7850bb0b6dc03d96c2c32c5d6a 100644 --- a/opentech/apply/funds/management/commands/migration_base.py +++ b/opentech/apply/funds/management/commands/migration_base.py @@ -11,7 +11,8 @@ from django_fsm import FSMField 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, RoundForm, LabType, LabForm +from opentech.apply.funds.models import ApplicationSubmission, FundType, Round, LabType +from opentech.apply.funds.models.forms import RoundBaseForm, LabBaseForm from opentech.apply.funds.workflow import INITIAL_STATE @@ -59,16 +60,16 @@ class MigrateCommand(BaseCommand): ROUND = Round.objects.get(title=self.ROUND_NAME) submission.round = ROUND if self.APPLICATION_TYPE == "request": - FORM = RoundForm.objects.get(round=ROUND) + FORM = RoundBaseForm.objects.get(round=ROUND) elif self.APPLICATION_TYPE == "concept": - FORM = RoundForm.objects.filter(round=ROUND)[0] + FORM = RoundBaseForm.objects.filter(round=ROUND)[0] elif self.APPLICATION_TYPE == "proposal": - FORM = RoundForm.objects.filter(round=ROUND)[1] + FORM = RoundBaseForm.objects.filter(round=ROUND)[1] submission.form_fields = FORM.form.form_fields elif self.CONTENT_TYPE == "lab": LAB = LabType.objects.get(title=self.LAB_NAME) submission.page = LAB - FORM = LabForm.objects.get(lab=LAB) + FORM = LabBaseForm.objects.get(lab=LAB) submission.form_fields = FORM.form.form_fields submission.status = self.get_workflow_state(node) diff --git a/opentech/apply/funds/management/commands/seed_rapid_response.py b/opentech/apply/funds/management/commands/seed_rapid_response.py index 68d25456513e9de9da899d9340103541d9cc23ee..b2ed4cb24de5af9912ab8c012325623605bb65e0 100644 --- a/opentech/apply/funds/management/commands/seed_rapid_response.py +++ b/opentech/apply/funds/management/commands/seed_rapid_response.py @@ -7,7 +7,9 @@ from django.core.management.base import BaseCommand from django.db import transaction from opentech.apply.categories.models import Category -from opentech.apply.funds.models import ApplicationForm, FundForm, FundType, Round +from opentech.apply.funds.models import ApplicationForm, FundType, Round +from opentech.apply.funds.models.forms import ApplicationBaseForm + from opentech.apply.home.models import ApplyHomePage from opentech.apply.users.groups import STAFF_GROUP_NAME @@ -94,7 +96,7 @@ class Command(BaseCommand): fund = FundType(title='Rapid Response', workflow_name='single') apply_home.add_child(instance=fund) - fund_form = FundForm.objects.create(fund=fund, form=application_form) + fund_form = ApplicationBaseForm.objects.create(fund=fund, form=application_form) fund.forms = [fund_form] fund.save()