Skip to content

Commit 1220c31

Browse files
authored
fix(attribute_generation): run mustach only on strings
1 parent 9b5c561 commit 1220c31

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/satosa/micro_services/attribute_generation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ def _synthesize(self, attributes, requester, provider):
129129
for attr_name, values in attributes.items():
130130
context[attr_name] = MustachAttrValue(
131131
attr_name,
132-
values if values is not None else []
132+
values
133+
if values
134+
and isinstance(values, list)
135+
and all(isinstance(value, str) for value in values)
136+
else [],
133137
)
134138

135139
recipes = get_dict_defaults(self.synthetic_attributes, requester, provider)

0 commit comments

Comments
 (0)