2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-10 13:51:01 +00:00

Ensure PartParameterTemplate name is unique

This commit is contained in:
Oliver Walters
2019-09-07 19:43:41 +10:00
parent 6752bdc1c6
commit 13270617b9
3 changed files with 21 additions and 1 deletions

View File

@@ -1068,7 +1068,7 @@ class PartParameterTemplate(models.Model):
""" Return the number of instances of this Parameter Template """
return self.instances.count()
name = models.CharField(max_length=100, help_text='Parameter Name')
name = models.CharField(max_length=100, help_text='Parameter Name', unique=True)
units = models.CharField(max_length=25, help_text='Parameter Units', blank=True)