Allow box_art to be null

This commit is contained in:
Joakim Hellsén 2026-01-05 21:49:11 +01:00
commit df6a77a1fd
No known key found for this signature in database
2 changed files with 23 additions and 1 deletions

View file

@ -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"),
),
]

View file

@ -77,9 +77,10 @@ class Game(models.Model):
default="", default="",
verbose_name="Display name", verbose_name="Display name",
) )
box_art = models.URLField( box_art = models.URLField( # noqa: DJ001
max_length=500, max_length=500,
blank=True, blank=True,
null=True, # We allow null here to distinguish between no box art and empty string
default="", default="",
verbose_name="Box art URL", verbose_name="Box art URL",
) )