Skip to content

Commit

Permalink
CatalogOfBlueskyRuns uses _core logic for int64 index
Browse files Browse the repository at this point in the history
  • Loading branch information
padraic-shafer committed Apr 13, 2024
1 parent 906c2e2 commit de1cf15
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions databroker/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,6 @@ def __getitem__(self, key):
pass
return self._lookup_by_partial_uid(key)
elif isinstance(key, numbers.Integral):
# Handle large values, such as numpy.int64
max_int_value = 2**31 - 1 ## 32-bit signed integer
if abs(key) <= max_int_value:
key = int(key)
else:
reason = " ".join(
f"Integer key must be less than +/-{max_int_value};",
f"cannot convert value {key} of type {type(key)}."
)
raise KeyError(reason)
if key > 0:
# CASE 2: Interpret key as a scan_id.
return self._lookup_by_scan_id(key)
Expand Down

0 comments on commit de1cf15

Please sign in to comment.