2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06: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:
Roche 2021-10-13 22:06:56 +05:30 committed by GitHub
commit b2670f3565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -727,7 +727,7 @@ class InvenTreeSetting(BaseInvenTreeSetting):
'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 }}",
"{{ part.revision if part.revision }}",
'validator': validate_part_name_format
},

View File

@ -145,7 +145,7 @@ class SettingsViewTest(TestCase):
# test default value
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)