mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Merge pull request #1 from matmair/pr/rocheparadox/2138
fix default setting to not change current behaviour
This commit is contained in:
commit
b2670f3565
@ -727,7 +727,7 @@ class InvenTreeSetting(BaseInvenTreeSetting):
|
|||||||
'name': _('Part Name Display Format'),
|
'name': _('Part Name Display Format'),
|
||||||
'description': _('Format to display the part name'),
|
'description': _('Format to display the part name'),
|
||||||
'default': "{{ part.IPN if part.IPN }}{{ ' | ' if part.IPN }}{{ part.name }}{{ ' | ' if part.revision }}"
|
'default': "{{ part.IPN if part.IPN }}{{ ' | ' if part.IPN }}{{ part.name }}{{ ' | ' if part.revision }}"
|
||||||
" {{ part.revision }}",
|
"{{ part.revision if part.revision }}",
|
||||||
'validator': validate_part_name_format
|
'validator': validate_part_name_format
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ class SettingsViewTest(TestCase):
|
|||||||
|
|
||||||
# test default value
|
# test default value
|
||||||
self.assertEqual(setting.value, "{{ part.IPN if part.IPN }}{{ ' | ' if part.IPN }}{{ part.name }}"
|
self.assertEqual(setting.value, "{{ part.IPN if part.IPN }}{{ ' | ' if part.IPN }}{{ part.name }}"
|
||||||
"{{ '|' if part.revision }} {{ part.revision }}")
|
"{{ ' | ' if part.revision }}{{ part.revision if part.revision }}")
|
||||||
|
|
||||||
url = self.get_url(setting.pk)
|
url = self.get_url(setting.pk)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user