Skip to content

Commit

Permalink
Check if data["content"] is a dict before using it as a dict
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cal authored Mar 8, 2024
1 parent c8a85fd commit b0c39f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sygnal/gcmpushkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ def _build_data(
data[attr] = data[attr][0:MAX_BYTES_PER_FIELD]

if api_version is APIVersion.V1:
if "content" in data:
if isinstance(data.get("content"), dict):
for attr, value in data["content"].items():
if not isinstance(value, str):
continue
Expand Down

0 comments on commit b0c39f3

Please sign in to comment.