mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-04 17:07:01 +01:00
fixed some warnings in backend
This commit is contained in:
1 parent
a6e946444a
commit
7848ee91f2
4 files changed
+40
-5
No files matched your search
@@ -56,6 +56,7 @@ class Category(models.Model):
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = "Categories"
|
||||
ordering = ['name']
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@@ -77,6 +78,7 @@ class Flavor(models.Model):
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['name', 'category'], name='unique_flavor_name_per_category')
|
||||
]
|
||||
ordering = ['name']
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name} ({self.category.name})"
|
||||
|
||||
Reference in new issue
Block a user