mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix default setting to not change current behaviour
This commit is contained in:
parent
0742fb063c
commit
147d2d4631
@ -726,8 +726,8 @@ class InvenTreeSetting(BaseInvenTreeSetting):
|
||||
'PART_NAME_FORMAT': {
|
||||
'name': _('Part Name Display Format'),
|
||||
'description': _('Format to display the part name'),
|
||||
'default': "{{ part.IPN if part.IPN }} {{ '|' if part.IPN }} {{ part.name }} {{ '|' if part.revision }}"
|
||||
" {{ part.revision }}",
|
||||
'default': "{{ part.IPN if part.IPN }}{{ ' | ' if part.IPN }}{{ part.name }}{{ ' | ' if part.revision }}"
|
||||
"{{ part.revision if part.revision }}",
|
||||
'validator': validate_part_name_format
|
||||
},
|
||||
|
||||
|
@ -144,8 +144,8 @@ class SettingsViewTest(TestCase):
|
||||
setting = InvenTreeSetting.get_setting_object('PART_NAME_FORMAT')
|
||||
|
||||
# test default value
|
||||
self.assertEqual(setting.value, "{{ part.IPN if part.IPN }} {{ '|' if part.IPN }} {{ part.name }} "
|
||||
"{{ '|' if part.revision }} {{ part.revision }}")
|
||||
self.assertEqual(setting.value, "{{ part.IPN if part.IPN }}{{ ' | ' if part.IPN }}{{ part.name }}"
|
||||
"{{ ' | ' if part.revision }}{{ part.revision if part.revision }}")
|
||||
|
||||
url = self.get_url(setting.pk)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user