Skip to content

Commit

Permalink
Always ensure there is a fingerprint for each signal (#2641)
Browse files Browse the repository at this point in the history
* Always ensure there is a fingerprint for each signal
  • Loading branch information
kevgliss authored Oct 31, 2022
1 parent 9631cf8 commit b264a98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 179 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""empty message
"""Merge revision
Revision ID: 34aeedc9d09a
Revises: 4b65941d065a, 01aa49ca0470, 3a5e776ddce4
Expand All @@ -10,8 +10,8 @@


# revision identifiers, used by Alembic.
revision = '34aeedc9d09a'
down_revision = ('4b65941d065a', '01aa49ca0470', '3a5e776ddce4')
revision = "34aeedc9d09a"
down_revision = ("4b65941d065a", "01aa49ca0470", "3a5e776ddce4")
branch_labels = None
depends_on = None

Expand Down
7 changes: 6 additions & 1 deletion src/dispatch/signal/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ def deduplicate(
) -> bool:
"""Find any matching duplication rules and match signals."""
duplicate = False

# always fingerprint
fingerprint = create_instance_fingerprint(duplication_rule.tag_types, signal_instance)
signal_instance.fingerprint = fingerprint
db_session.commit()

if not duplication_rule:
return duplicate

Expand All @@ -281,7 +287,6 @@ def deduplicate(
signal_instance.case_id = instances[0].case_id
signal_instance.duplication_rule_id = duplication_rule.id

signal_instance.fingerprint = fingerprint
db_session.commit()
return duplicate

Expand Down
175 changes: 0 additions & 175 deletions src/dispatch/static/dispatch/src/components/Combobox.vue

This file was deleted.

0 comments on commit b264a98

Please sign in to comment.