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
433 delete sensor #784
Merged
Merged
433 delete sensor #784
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <guus@seita.nl>
nhoening
requested changes
Aug 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, aside from a small test improvement.
I actually checked if our data model cascades deletion to beliefs, but it doesn't look like it. (for reference, the asset deletion cascade is here)
But that's not a problem of this endpoint Your test shows it's happening.
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: GustaafL <41048720+GustaafL@users.noreply.github.com>
nhoening
approved these changes
Aug 2, 2023
nhoening
added a commit
that referenced
this pull request
Aug 2, 2023
* feat(sensors): adds fetch_one sensor endpoint to API Signed-off-by: GustaafL <guus@seita.nl> * feat(sensors): adds post sensor to API Signed-off-by: GustaafL <guus@seita.nl> * post sensor still needs work Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): adds post sensor Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): changes the docstring of the post function Signed-off-by: GustaafL <guus@seita.nl> * clearer names for the arguments to permission_required_for_context decorator, especially arg_loader was misleading Signed-off-by: Nicolas Höning <nicolas@seita.nl> * one more renaming Signed-off-by: Nicolas Höning <nicolas@seita.nl> * expanding possibilities in the require_permission_for_context decorator, for when we only have an AuthModelMixin ID. Signed-off-by: Nicolas Höning <nicolas@seita.nl> * feat(sensor): post sensor without schema changes Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): adds patch sensor Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): change importin users services Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): update changelogs and fix import Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): update failing test Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): tests for patching excluded attributes and no auth Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): remove NewDurationField since it's unused Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): removes print statement Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): test if database changed after patch Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): tests for patch response json Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): updates docstrings patch sensor Signed-off-by: GustaafL <guus@seita.nl> * tests(sensor): test for updating fields that are not allowed and improved docs Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): updated api changelog typo Signed-off-by: GustaafL <guus@seita.nl> * feat(sensor): add id field(dump_only) to schema and response json Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): edit docstrings to include id in example response Signed-off-by: GustaafL <guus@seita.nl> * 433 delete sensor (#784) * feat(sensor): adds delete sensor endpoint Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): updated api changelog Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): updated api changelog whitespace Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): updated api changelog missing / Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): update changelog Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): update changelog typo Signed-off-by: GustaafL <guus@seita.nl> * docs(sensor): update changelog missing space Signed-off-by: GustaafL <guus@seita.nl> * tests(sensor): check for float instead of exact value Signed-off-by: GustaafL <guus@seita.nl> --------- Signed-off-by: GustaafL <guus@seita.nl> Signed-off-by: GustaafL <41048720+GustaafL@users.noreply.github.com> --------- Signed-off-by: GustaafL <guus@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Signed-off-by: GustaafL <41048720+GustaafL@users.noreply.github.com> Co-authored-by: Nicolas Höning <nicolas@seita.nl>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds an API endpoint to delete a sensor
Look & Feel
sensors/<id>
DELETERelated Items
This PR closes issue #433