Fix bug with 'Set value' in templates

This fixes bug with 'Set value' action in Django/Jinja2 templates.