Unique each tag, identify tagging rule by name
This commit is contained in:
parent
423805cce6
commit
3a9627f9b5
@ -7,7 +7,7 @@ class Tag(models.Model):
|
||||
A bog-standard tag, applicable to any OdyseeRelease
|
||||
"""
|
||||
id = models.CharField(primary_key=True, max_length=512, default=uuid.uuid4, editable=False, db_index=True, help_text="A unique identifier for this tag")
|
||||
name = models.CharField(max_length=256, help_text="The name for this tag as it should be displayed across UIs")
|
||||
name = models.CharField(max_length=256, unique=True, help_text="The name for this tag as it should be displayed across UIs")
|
||||
description = models.TextField(help_text="A user-facing description of the tag")
|
||||
|
||||
def __str__(self):
|
||||
@ -24,7 +24,7 @@ class TaggingRule(models.Model):
|
||||
tag = models.ForeignKey(Tag, on_delete=models.CASCADE, db_index=True, help_text="The tag to assign a release with")
|
||||
|
||||
def __str__(self):
|
||||
return str(self.tag)
|
||||
return str(self.name)
|
||||
|
||||
class OdyseeChannel(models.Model):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user