Skip to content

Commit

Permalink
Fixes signal instance deduplication check. (#4012)
Browse files Browse the repository at this point in the history
* Deduplicating signal instances should only occur when those instances are associated with a case.

* Checks for existing cases before signal deduplication.

---------

Co-authored-by: kevgliss <[email protected]>
  • Loading branch information
metroid-samus and kevgliss authored Nov 27, 2023
1 parent e858e78 commit f5b49ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dispatch/signal/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ def signal_instance_create_flow(
db_session=db_session,
signal_instance=signal_instance,
):
# If the signal was deduplicated, we can assume a case exists,
# and we need to update the corresponding signal message
if _should_update_signal_message(signal_instance):
# If a case exists and the signal was deduplicated,
# we need to update the corresponding signal message
if signal_instance.case_id and _should_update_signal_message(signal_instance):
update_signal_message(
db_session=db_session,
signal_instance=signal_instance,
Expand Down

0 comments on commit f5b49ca

Please sign in to comment.