From e1a0e79ead86d44a28439cdf4f891798c3e94fe4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 20:23:44 +1000 Subject: [PATCH] Fix settings function callback (#5259) (#5262) * fix settings function callback * merge instance filters and passed keys (cherry picked from commit df77305d60788af1c758e4c1289530138622c260) Co-authored-by: Matthias Mair --- InvenTree/common/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 2177521480..0fa1f14660 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -190,7 +190,7 @@ class BaseInvenTreeSetting(models.Model): kwargs: Keyword arguments to pass to the function """ # Get action - setting = self.get_setting_definition(self.key, *args, **kwargs) + setting = self.get_setting_definition(self.key, *args, **{**self.get_filters_for_instance(), **kwargs}) settings_fnc = setting.get(reference, None) # Execute if callable