-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: Added event existence check upon alert creation #149
Conversation
Codecov Report
@@ Coverage Diff @@
## master #149 +/- ##
==========================================
+ Coverage 89.98% 90.33% +0.34%
==========================================
Files 28 28
Lines 839 859 +20
==========================================
+ Hits 755 776 +21
+ Misses 84 83 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
This PR looks good to me as long as it responds to the problem of linking an alert flow to an event !
Thanks for opening it !
lon: float, | ||
device_id: int, | ||
event_id: Optional[int] = None, | ||
media_id: Optional[int] = None |
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.
By setting media_id optional, an alert can be sent without related media ? (I am just wandering if its related to this PR but why not ! )
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.
Oh no, this is something that we decided a long time ago 😅 (cf. the SQL table field ;) )
It's for the future case when someone notifies an alert but has no mean to send the picture
Following up on #146, this PR introduces the following modifications:
event_id
optional in alert creation payloadsAny feedback is welcome!