Skip to content

Commit

Permalink
[hma] Fix Broken UI due to lookup change (#1642)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmrad authored Oct 3, 2024
1 parent 806f30e commit 027742c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def query_media():
return signal_type_to_signal_map
abort(500, "Something went wrong while hashing the provided media.")

include_distance = bool(request.args.get("include_distance", False)) == True
include_distance = str_to_bool(request.args.get("include_distance", "false"))
lookup_signal_func = (
lookup_signal_with_distance if include_distance else lookup_signal
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,8 @@ def lookup(signal, signal_type_name):
raw_results = lookup_signal(signal, signal_type_name)
storage = get_storage()
current_app.logger.debug("getting bank content")
contents = storage.bank_content_get(
{cid for l in raw_results.values() for cid in l}
)
current_app.logger.debug(raw_results)
contents = storage.bank_content_get(raw_results)
enabled = [c for c in contents if c.enabled]
current_app.logger.debug(
"lookup matches %d content ids (%d enabled)", len(contents), len(enabled)
Expand Down

0 comments on commit 027742c

Please sign in to comment.