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] Default template selection must filter by backend #354

Closed
3 tasks
nemesifier opened this issue Dec 28, 2020 · 0 comments · Fixed by #359
Closed
3 tasks

[bug] Default template selection must filter by backend #354

nemesifier opened this issue Dec 28, 2020 · 0 comments · Fixed by #359
Assignees

Comments

@nemesifier
Copy link
Member

Try creating a template flagged as default for the OpenWRT backend, then create a new device, click on "add configuration", then select OpenWISP Firmware 1.x as backend, then select the organization.

Expected result: the default template for the OpenWRT backend is not auto selected.

Actual result: the default template for the OpenWRT backend is selected.

We must modify the logic of the device admin page so that:

  • the value of the backend field can be passsed and used as a filter (must be required), please ensure the interaction with the method Config.get_default_templates respects the backend filtering already done by that method
  • the JS logic should listen also to the on change of the backend field, it must trigger the HTTP request only when both organization and backend are selected
  • we should also add a new test in config.tests.test_controller to ensure the backend is respected: create a default template for openwrt, register a device using the openwisp1.x backend and ensure the default template for openwrt is not assigned. This should work according to the implementation of Config.get_default_templates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants