diff --git a/events/migrations/0042_allow_team_without_country.py b/events/migrations/0042_allow_team_without_country.py new file mode 100644 index 0000000..452d06c --- /dev/null +++ b/events/migrations/0042_allow_team_without_country.py @@ -0,0 +1,19 @@ +# Generated by Django 2.0 on 2018-08-19 17:22 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0041_add_private_personal_team_types'), + ] + + operations = [ + migrations.AlterField( + model_name='team', + name='country', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='events.Country'), + ), + ] diff --git a/events/models/profiles.py b/events/models/profiles.py index f2e87d8..43546e7 100644 --- a/events/models/profiles.py +++ b/events/models/profiles.py @@ -345,7 +345,7 @@ class Team(models.Model): about_page = models.TextField(blank=True, null=True) - country = models.ForeignKey(Country, on_delete=models.CASCADE) + country = models.ForeignKey(Country, null=True, blank=True, on_delete=models.CASCADE) spr = models.ForeignKey(SPR, null=True, blank=True, on_delete=models.CASCADE) city = models.ForeignKey(City, null=True, blank=True, on_delete=models.CASCADE)