Skip to content

Commit 2766739

Browse files
authored
Fix bug where default values were dropped when parsing protobuf tombstones (#617)
1 parent 9c84afb commit 2766739

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/mvt/android/artifacts/tombstone_crashes.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class TombstoneCrashResult(pydantic.BaseModel):
6262
process_name: Optional[str] = None
6363
binary_path: Optional[str] = None
6464
selinux_label: Optional[str] = None
65-
uid: Optional[int] = None
65+
uid: int
6666
signal_info: SignalInfo
6767
cause: Optional[str] = None
6868
extra: Optional[str] = None
@@ -124,7 +124,9 @@ def parse_protobuf(
124124
Parse Android tombstone crash files from a protobuf object.
125125
"""
126126
tombstone_pb = Tombstone().parse(data)
127-
tombstone_dict = tombstone_pb.to_dict(betterproto.Casing.SNAKE)
127+
tombstone_dict = tombstone_pb.to_dict(
128+
betterproto.Casing.SNAKE, include_default_values=True
129+
)
128130

129131
# Add some extra metadata
130132
tombstone_dict["timestamp"] = self._parse_timestamp_string(

0 commit comments

Comments
 (0)