mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-20 23:15:10 +00:00
improve regex for part name format validation
proper import of validation
This commit is contained in:
1 parent
ee9e01fc22
commit
5a6bea3452
2 files changed
+3
-2
No files matched your search
@@ -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