Skip to content

Commit

Permalink
Deserialization fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwb committed Dec 18, 2024
1 parent d704422 commit 71a5ced
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdks/python/apache_beam/metrics/cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,9 @@ def from_proto(proto: metrics_pb2.BoundedTrie) -> 'BoundedTrieData':
return BoundedTrieData(
bound=proto.bound,
singleton=tuple(proto.singleton) if proto.singleton else None,
root=_BoundedTrieNode.from_proto(proto.root) if proto.root else None)
root=(
_BoundedTrieNode.from_proto(proto.root)
if proto.HasField('root') else None))

def as_trie(self):
if self._root is not None:
Expand Down

0 comments on commit 71a5ced

Please sign in to comment.