Use CachedTicket.get_or_create to avoid duplicates

This commit is contained in:
Raphael Michel
2016-10-18 18:57:20 +02:00
parent 574f07877d
commit f3509707d7
4 changed files with 28 additions and 17 deletions

View File

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-18 16:54
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0040_u2fdevice'),
]
operations = [
migrations.AlterField(
model_name='cachedticket',
name='cachedfile',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='pretixbase.CachedFile'),
),
]