Skip to content

fix skipped None #566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sentry_sdk/integrations/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def _logging_to_event_level(levelname):
"tags",
"thread",
"threadName",
"stack_info",
)
)

Expand Down
7 changes: 3 additions & 4 deletions sentry_sdk/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def _serialize_node_impl(
# might mutate our dictionary while we're still iterating over it.
obj = dict(iteritems(obj))

rv_dict = {}
rv_dict = {} # type: Dict[str, Any]
i = 0

for k, v in iteritems(obj):
Expand All @@ -285,9 +285,8 @@ def _serialize_node_impl(
else None,
remaining_breadth=remaining_breadth,
)
if v is not None:
rv_dict[str_k] = v
i += 1
rv_dict[str_k] = v
i += 1

return rv_dict

Expand Down
6 changes: 5 additions & 1 deletion sentry_sdk/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,11 @@ def record_sql_queries(

query = _format_sql(cursor, query)

data = {"db.params": params_list, "db.paramstyle": paramstyle}
data = {}
if params_list is not None:
data["db.params"] = params_list
if paramstyle is not None:
data["db.paramstyle"] = paramstyle
if executemany:
data["db.executemany"] = True

Expand Down