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] REST API can creates device configs inadvertently #699

Closed
nemesifier opened this issue Oct 10, 2022 · 0 comments · Fixed by #759
Closed

[bug] REST API can creates device configs inadvertently #699

nemesifier opened this issue Oct 10, 2022 · 0 comments · Fixed by #759
Labels

Comments

@nemesifier
Copy link
Member

This is a follow up of #697 (review).

Create a device with no related configuration.

Open the REST API endpoint to change the device details, eg:
http://localhost:8000/api/v1/controller/device/{pk}/

Now, hit the PUT button without changing anything.

Expected result:

  • device is saved but config is not created because no data was added

Actual result:

  • config is created empty

If I reset the repository state to before #697, an exception is raised.
After merging #697 the exception is not raised anymore and the config is created.
Ideally we shouldn't create/change the config unless anything in the config object is added/changed.

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

Successfully merging a pull request may close this issue.

1 participant