Merge pull request #19 from jr-k/bugfix/null-safe-selectables-variable
Null safe check for Variable selectables field
This commit is contained in:
commit
b0b484c2b3
@ -127,9 +127,10 @@ class Variable:
|
||||
value = self.eval()
|
||||
|
||||
if self.type == VariableType.SELECT_SINGLE:
|
||||
for selectable in self.selectables:
|
||||
if selectable.key == value:
|
||||
return str(selectable.label)
|
||||
if isinstance(self._selectables, list):
|
||||
for selectable in self.selectables:
|
||||
if selectable.key == value:
|
||||
return str(selectable.label)
|
||||
|
||||
return value
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user