summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2024-05-24 12:15:49 +0200
committerGitHub <noreply@github.com>2024-05-24 12:15:49 +0200
commitcf0356a6f38ca18b28b22d9f8e6b5bc8d3f01e19 (patch)
tree3905c67cceac7fda89c94bec16ff4334896f0123 /lib/extensions
parent8b92b0333d5b8b2c8f0482c17a8345149d03f777 (diff)
fix boolean param (#2942)
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/params.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/extensions/params.py b/lib/extensions/params.py
index e76338b4..77aab310 100644
--- a/lib/extensions/params.py
+++ b/lib/extensions/params.py
@@ -686,15 +686,14 @@ class Params(InkstitchExtension):
return sorted(list(nodes_by_class.items()), key=lambda cls_nodes: cls_nodes[0].__name__)
def get_values(self, param, nodes):
- getter = 'get_param'
-
if param.type in ('toggle', 'boolean'):
getter = 'get_boolean_param'
+ values = [item for item in (getattr(node, getter)(
+ param.name, param.default) for node in nodes) if item is not None]
else:
getter = 'get_param'
-
- values = [item if item is not None else "" for item in (getattr(node, getter)(
- param.name, param.default) for node in nodes)]
+ values = [item if item is not None else "" for item in (getattr(node, getter)(
+ param.name, param.default) for node in nodes)]
return values