2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

improve regex for part name format validation

proper import of validation
This commit is contained in:
rocheparadox
2021-10-14 09:35:26 +05:30
parent ee9e01fc22
commit 5a6bea3452
2 changed files with 3 additions and 2 deletions

View File

@ -25,6 +25,7 @@ from django.core.exceptions import ValidationError
import InvenTree.helpers
import InvenTree.fields
import InvenTree.validators
import logging
@ -707,7 +708,7 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'description': _('Format to display the part name'),
'default': "{{ part.IPN if part.IPN }}{{ ' | ' if part.IPN }}{{ part.name }}{{ ' | ' if part.revision }}"
"{{ part.revision if part.revision }}",
'validator': InvenTree.fields.validate_part_name_format
'validator': InvenTree.validators.validate_part_name_format
},
'REPORT_DEBUG_MODE': {