-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: fetch only alerts for unacknowledged events #107
Conversation
- add `call_api` method to _utils.py - protection against undefined variables (raise ValueError)
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.
Love this PR, thanks a lot @blenzi
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.
Thanks a lot for the PR.
In addition to the comments, please bear in mind that the new get_alerts_for_event() should be in production before merging this.
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.
Thanks a lot for the changes.
Can you confirme then production API is up to date and then we merge.
Following pyronear/pyro-api#268, this PR fixes the retrieval of alerts by fetching the alerts associated with unacknowledged events. In addition:
call_api
method and use to avoid code repetitionraise ValueError
)