Skip to content

Commit

Permalink
Fix templating repeat_for (#190)
Browse files Browse the repository at this point in the history
Signed-off-by: Trishna Guha <[email protected]>
  • Loading branch information
trishnaguha authored Oct 23, 2018
1 parent 37c1010 commit e08ef8d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/network_engine/plugins/template/json_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ def run(self, template, variables=None):

for loop_item in loop_data:
variables[loop_var] = loop_item
templated_value.append(self.template(items, variables))
if isinstance(items, string_types):
templated_value.append(self.template(items, variables))
else:
templated_value.append(self.run(items, variables))

if item_type == 'list':
templated_items[key] = templated_value
Expand Down

0 comments on commit e08ef8d

Please sign in to comment.