2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

IPN must match regex validator (if one is provided)

This commit is contained in:
Oliver Walters
2020-02-03 21:09:24 +11:00
parent 356b6cf15b
commit 9cef038d6a
3 changed files with 35 additions and 1 deletions

View File

@ -349,7 +349,7 @@ class Part(models.Model):
on_delete=models.DO_NOTHING,
help_text=_('Part category'))
IPN = models.CharField(max_length=100, blank=True, help_text=_('Internal Part Number'))
IPN = models.CharField(max_length=100, blank=True, help_text=_('Internal Part Number'), validators=[validators.validate_part_ipn])
revision = models.CharField(max_length=100, blank=True, help_text=_('Part revision or version number'))