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

[change] Send config_modified signal when device templates are changed and config.status is modified #394

Closed
nemesifier opened this issue Mar 3, 2021 · 1 comment · Fixed by #395

Comments

@nemesifier
Copy link
Member

nemesifier commented Mar 3, 2021

I was expecting the config_modified signal to be sent when templates are added, removed or their order is changed from a device but this doesn't seem to happen if config.status is modified.

How to replicate:

  • create a few templates
  • create a device and a config, edit the config and save, ensure config status is modified
  • add a template to a device or remove or change their order

Expected result:

  • config_modified signal emitted

Actual result:

  • config_modified signal not emitted

Notes:

  • emit signal after post_add or post_remove
  • ensure signal is not sent twice (if the contents of the config have already been changed, the signal will be sent, so we must ensure it's not sent twice)
@nemesifier nemesifier added the bug label Mar 3, 2021
@nemesifier nemesifier self-assigned this Mar 3, 2021
@nemesifier nemesifier added this to Backlog in OpenWISP Priorities for next releases via automation Mar 3, 2021
@nemesifier nemesifier changed the title [bug] The config_modified signal not sent when device templates are changed [bug] The config_modified signal is not sent when device templates are changed Mar 3, 2021
@nemesifier nemesifier changed the title [bug] The config_modified signal is not sent when device templates are changed [bug] The config_modified signal is not sent when device templates are changed and config.status is modified Mar 3, 2021
@nemesifier nemesifier changed the title [bug] The config_modified signal is not sent when device templates are changed and config.status is modified [change] Send config_modified signal when device templates are changed and config.status is modified Mar 3, 2021
@nemesifier nemesifier added enhancement and removed bug labels Mar 3, 2021
@nemesifier
Copy link
Member Author

While working on this I figured out it's not really a bug but it was implemented this way on purpose, so this is a change of behaviour rather than a bugfix, but I think it's important to do it to avoid ambiguities and make the config_modified signal reliable.

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

Successfully merging a pull request may close this issue.

1 participant