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

Replace device in the right poll frequency array when updated #1470

Merged
merged 1 commit into from Mar 18, 2022

Conversation

Pierre-Gilles
Copy link
Contributor

@Pierre-Gilles Pierre-Gilles commented Mar 15, 2022

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If you are adding a new features/services, did you run integration comparator? (npm run compare-translations on front)
  • Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community for testing before merging.
  • If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
  • If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.
  • Did you add fake requests data for the demo mode (front/src/config/demo.js) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

Fix bug when updating a device, it would be added multiple time to the poll array

@Pierre-Gilles
Copy link
Contributor Author

@atrovato Found a bug while investigating on this, if you save multiple time a device, it's added multiple time to the array of devices! Example on the camera integration, if I rename my camera, my camera will be poll multiple time in a row !

@relativeci
Copy link

relativeci bot commented Mar 15, 2022

Job #238: Bundle Size — 6.73MB (0%).

ee812a2 vs 4644c68

No changes


View Job #238 report on app.relative-ci.com

@codecov
Copy link

codecov bot commented Mar 15, 2022

Codecov Report

Merging #1470 (9d3b051) into master (31e22b3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1470   +/-   ##
=======================================
  Coverage   96.58%   96.58%           
=======================================
  Files         616      616           
  Lines        8873     8879    +6     
=======================================
+ Hits         8570     8576    +6     
  Misses        303      303           
Impacted Files Coverage Δ
server/lib/device/device.add.js 100.00% <100.00%> (ø)
server/lib/device/device.create.js 98.48% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31e22b3...9d3b051. Read the comment docs.

Copy link
Contributor

@atrovato atrovato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice shot!

@Pierre-Gilles Pierre-Gilles merged commit ee812a2 into master Mar 18, 2022
@Pierre-Gilles Pierre-Gilles deleted the fix-remove-poll-frequency branch March 18, 2022 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants