diff --git a/twitch/migrations/0002_alter_game_box_art.py b/twitch/migrations/0002_alter_game_box_art.py new file mode 100644 index 0000000..0684510 --- /dev/null +++ b/twitch/migrations/0002_alter_game_box_art.py @@ -0,0 +1,21 @@ +# Generated by Django 6.0 on 2026-01-05 20:47 +from __future__ import annotations + +from django.db import migrations +from django.db import models + + +class Migration(migrations.Migration): + """Alter box_art field to allow null values.""" + + dependencies = [ + ("twitch", "0001_initial"), + ] + + operations = [ + migrations.AlterField( + model_name="game", + name="box_art", + field=models.URLField(blank=True, default="", max_length=500, null=True, verbose_name="Box art URL"), + ), + ] diff --git a/twitch/models.py b/twitch/models.py index 6aa5307..20385fe 100644 --- a/twitch/models.py +++ b/twitch/models.py @@ -77,9 +77,10 @@ class Game(models.Model): default="", verbose_name="Display name", ) - box_art = models.URLField( + box_art = models.URLField( # noqa: DJ001 max_length=500, blank=True, + null=True, # We allow null here to distinguish between no box art and empty string default="", verbose_name="Box art URL", )