fix: creacion repetida de categoria de productos.

This commit is contained in:
2024-06-29 16:23:47 -05:00
parent 252720b324
commit ed5d3f447a
4 changed files with 49 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ class MeasuringUnits(models.TextChoices):
UNIT = 'UNIT', _('Unit')
class ProductCategory(models.Model):
name = models.CharField(max_length=100)
name = models.CharField(max_length=100, unique=True)
def __str__(self):
return self.name