Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #735 from uktrade/feature/update-fdi
Browse files Browse the repository at this point in the history
Remove not specified FDI
  • Loading branch information
PippoRaimondiDIT authored Oct 13, 2023
2 parents 758119b + b1cfc49 commit 8ddabf8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 20 additions & 0 deletions app/enquiries/migrations/0026_remove_FDI_not_specified.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from django.db import migrations, models

def set_not_specified_to_default(apps, schema_editor):
Enquiry = apps.get_model('enquiries', 'Enquiry')
Enquiry.objects.filter(investment_type='NOT_SPECIFIED').update(investment_type='DEFAULT')

class Migration(migrations.Migration):

dependencies = [
('enquiries', '0025_auto_20230622_1559'),
]

operations = [
migrations.RunPython(set_not_specified_to_default, reverse_code=migrations.RunPython.noop),
migrations.AlterField(
model_name='enquiry',
name='investment_type',
field=models.CharField(choices=[('DEFAULT', '----'), ('ACQUISITION', 'Acquisition'), ('CAPITAL_ONLY', 'Capital only'), ('NEW_SITE', 'Creation of new site or activity'), ('EXPANSION', 'Expansion of existing site or activity'), ('JOINT_VENTURE', 'Joint venture'), ('MERGER', 'Merger'), ('RETENTION', 'Retention')], default='DEFAULT', max_length=255, verbose_name='Investment type'),
),
]
1 change: 0 additions & 1 deletion app/enquiries/ref_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ class InvestmentType(models.TextChoices):
JOINT_VENTURE = "JOINT_VENTURE", _("Joint venture")
MERGER = "MERGER", _("Merger")
RETENTION = "RETENTION", _("Retention")
NOT_SPECIFIED = "NOT_SPECIFIED", _("Not specified")


class NewExistingInvestor(models.TextChoices):
Expand Down

0 comments on commit 8ddabf8

Please sign in to comment.