Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into migration-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Action authored and GitHub Action committed Apr 5, 2024
2 parents 193e7df + 6bfd7c6 commit 478e285
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions datahub/export_win/migrations/0037_alter_win_sector.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.10 on 2024-04-05 12:12

from django.db import migrations
import django.db.models.deletion
import mptt.fields


class Migration(migrations.Migration):

dependencies = [
('export_win', '0036_hvc_2024_update'),
]

operations = [
migrations.AlterField(
model_name='win',
name='sector',
field=mptt.fields.TreeForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='wins', to='metadata.sector'),
),
]
4 changes: 3 additions & 1 deletion datahub/export_win/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from django.db.models.signals import post_save
from django.dispatch import receiver

from mptt.fields import TreeForeignKey

from datahub.company.models import (
Advisor,
Company,
Expand Down Expand Up @@ -263,7 +265,7 @@ class Win(BaseModel):
total_expected_non_export_value = models.BigIntegerField()
total_expected_odi_value = models.BigIntegerField()

sector = models.ForeignKey(
sector = TreeForeignKey(
Sector,
related_name='wins',
on_delete=models.PROTECT,
Expand Down

0 comments on commit 478e285

Please sign in to comment.