allow blank values, stupid django

This commit is contained in:
Thomas Steen Rasmussen 2021-08-03 07:22:00 +02:00
parent 48952c5463
commit fa1aac03bb
2 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,28 @@
# Generated by Django 3.2.5 on 2021-08-03 05:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("tickets", "0020_populate_ticket_used_when"),
]
operations = [
migrations.AlterField(
model_name="discountticket",
name="used_time",
field=models.DateTimeField(blank=True, null=True),
),
migrations.AlterField(
model_name="shopticket",
name="used_time",
field=models.DateTimeField(blank=True, null=True),
),
migrations.AlterField(
model_name="sponsorticket",
name="used_time",
field=models.DateTimeField(blank=True, null=True),
),
]

View file

@ -98,7 +98,7 @@ def qr_code_base64(token):
class BaseTicket(CampRelatedModel, UUIDModel): class BaseTicket(CampRelatedModel, UUIDModel):
ticket_type = models.ForeignKey("TicketType", on_delete=models.PROTECT) ticket_type = models.ForeignKey("TicketType", on_delete=models.PROTECT)
used = models.BooleanField(default=False) used = models.BooleanField(default=False)
used_time = models.DateTimeField(null=True) used_time = models.DateTimeField(null=True, blank=True)
badge_handed_out = models.BooleanField(default=False) badge_handed_out = models.BooleanField(default=False)
token = models.CharField(max_length=64, blank=True) token = models.CharField(max_length=64, blank=True)
badge_token = models.CharField(max_length=64, blank=True) badge_token = models.CharField(max_length=64, blank=True)