This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #735 from uktrade/feature/update-fdi
Remove not specified FDI
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters