Skip to content

Commit

Permalink
Check for null key
Browse files Browse the repository at this point in the history
  • Loading branch information
cmanallen committed Sep 12, 2024
1 parent f7a722c commit 3eaa579
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sentry_sdk/flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ def __init__(self, capacity):

def add(self, name, result):
# type: (str, bool) -> None
assert name is not None
self._cache.set(name, Flag(name, result))
# NOTE: Should we log null names?
if name is not None:
self._cache.set(name, Flag(name, result))

def serialize(self):
# type: () -> Flags
Expand Down

0 comments on commit 3eaa579

Please sign in to comment.