We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e7ee8b commit 7362135Copy full SHA for 7362135
ticket/models.py
@@ -1,5 +1,7 @@
1
from __future__ import annotations
2
3
+from uuid import uuid4
4
+
5
import shortuuid
6
from constance import config
7
from django.contrib.auth import get_user_model
@@ -9,7 +11,7 @@
9
11
10
12
13
class TicketType(models.Model):
- id = models.UUIDField(primary_key=True)
14
+ id = models.UUIDField(primary_key=True, default=lambda: str(uuid4()))
15
name = models.CharField(max_length=100)
16
price = models.IntegerField()
17
min_price = models.IntegerField(null=True, blank=True)
0 commit comments