Skip to content

Commit

Permalink
game class to set null on class deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
dionizh committed Jan 18, 2022
1 parent 8cb73bf commit 94a0799
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions aimmo/migrations/0028_manygames.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.2.26 on 2022-01-18 10:56
# Generated by Django 2.2.26 on 2022-01-18 16:20

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -14,6 +14,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='game',
name='game_class',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='common.Class', verbose_name='Class'),
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='common.Class', verbose_name='Class'),
),
]
2 changes: 1 addition & 1 deletion aimmo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Game(models.Model):
game_class = models.ForeignKey(
Class,
verbose_name="Class",
on_delete=models.CASCADE,
on_delete=models.SET_NULL,
blank=True,
null=True,
)
Expand Down

0 comments on commit 94a0799

Please sign in to comment.