diff --git a/helpdesk/teams/migrations/0005_alter_team_options_alter_team_pit_location.py b/helpdesk/teams/migrations/0005_alter_team_options_alter_team_pit_location.py new file mode 100644 index 0000000..3243bed --- /dev/null +++ b/helpdesk/teams/migrations/0005_alter_team_options_alter_team_pit_location.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.11 on 2024-04-10 18:14 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('teams', '0004_add_team_comment'), + ] + + operations = [ + migrations.AlterModelOptions( + name='team', + options={'ordering': ['tla']}, + ), + migrations.AlterField( + model_name='team', + name='pit_location', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='teams.teampitlocation'), + ), + ] diff --git a/helpdesk/teams/models.py b/helpdesk/teams/models.py index ec78998..dc12697 100644 --- a/helpdesk/teams/models.py +++ b/helpdesk/teams/models.py @@ -24,7 +24,7 @@ class Team(models.Model): ) name = models.CharField("Team Name", max_length=100) is_rookie = models.BooleanField("Is Rookie") - pit_location = models.ForeignKey(TeamPitLocation, on_delete=models.PROTECT) + pit_location = models.ForeignKey(TeamPitLocation, on_delete=models.PROTECT, null=True) class Meta: ordering = ["tla"]