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:
@ -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': {
|
||||
|
Reference in New Issue
Block a user