Skip to content

Commit

Permalink
[hma] pytx version bump and keyword arg name fix in matcher_base (#880)
Browse files Browse the repository at this point in the history
* update pytx version

* rename incorrectly named signal_value to content_hash in matcher lambda and matcher base
  • Loading branch information
BarrettOlson authored Dec 9, 2021
1 parent 1f75630 commit dfdc667
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion hasher-matcher-actioner/hmalib/lambdas/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def lambda_handler(event, context):
matcher.write_match_record_for_result(
table=table,
signal_type=hash_record.signal_type,
signal_value=hash_record.content_hash,
content_hash=hash_record.content_hash,
content_id=hash_record.content_id,
match=match,
)
Expand Down
16 changes: 8 additions & 8 deletions hasher-matcher-actioner/hmalib/matchers/matchers_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def write_match_record_for_result(
self,
table: Table,
signal_type: t.Type[SignalType],
signal_value: str,
content_hash: str,
content_id: str,
match: IndexMatch,
):
Expand All @@ -132,13 +132,13 @@ def write_match_record_for_result(
for match record calls.
"""
MatchRecord(
content_id,
signal_type,
signal_value,
datetime.datetime.now(),
str(match.metadata["id"]),
match.metadata["source"],
match.metadata["hash"],
content_id=content_id,
signal_type=signal_type,
content_hash=content_hash,
updated_at=datetime.datetime.now(),
signal_id=str(match.metadata["id"]),
signal_source=match.metadata["source"],
signal_hash=match.metadata["hash"],
).write_to_table(table)

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion hasher-matcher-actioner/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
install_requires=[
"boto3",
"boto3-stubs[essential,sns,dynamodbstreams]==1.17.14.0",
"threatexchange[faiss,pdq_hasher]>=0.0.27",
"threatexchange[faiss,pdq_hasher]>=0.0.29",
"bottle",
"apig_wsgi",
"pyjwt[crypto]==2.1.0",
Expand Down

0 comments on commit dfdc667

Please sign in to comment.