Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Context loaded from default values of templates via JS should not overwrite system defined variables #352

Closed
nemesifier opened this issue Dec 19, 2020 · 0 comments · Fixed by #355

Comments

@nemesifier
Copy link
Member

Testing with 0.8.3 or latest master.
Bug affecting Configuration variables.

How to replicate:

Try defining a template in which the configuration uses {{name}} (the device name).
Add name to the default values of the template.

Assign this template to a device.

Expected outcome:

  • context is taken from the default template, but the name key is not added to the device context
  • name of device is used in the resulting configuration

Actual outcome:

  • context is taken from the default template and the name key is added to the device context, which overwrites the system defined variable
  • name defined in the default template value used in the resulting configuration

Best explained with a GIF:

variables-bug

Name should not be added to the configuration variables.

Not just name, any configuration variable from the system defined variables must not be overwritten by the JS which loads the default values from templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants