From 210d39c8b7430f659a08decd1c39c52b9b5988fb Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 26 Oct 2020 22:44:16 +1100 Subject: [PATCH] Bug fix - re-introduce settings_value custom tag (cherry picked from commit 9203f541be418499433ac39cf7294c5875196ecd) --- InvenTree/part/templatetags/inventree_extras.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/InvenTree/part/templatetags/inventree_extras.py b/InvenTree/part/templatetags/inventree_extras.py index 3af495cc1c..5fbdda1d0e 100644 --- a/InvenTree/part/templatetags/inventree_extras.py +++ b/InvenTree/part/templatetags/inventree_extras.py @@ -106,6 +106,15 @@ def setting_object(key, *args, **kwargs): return setting +@register.simple_tag() +def settings_value(key, *args, **kwargs): + """ + Return a settings value specified by the given key + """ + + return InvenTreeSetting.get_setting(key) + + @register.simple_tag() def get_color_theme_css(username): try: