Skip to content

Commit 71a5ced

Browse files
committed
Deserialization fix.
1 parent d704422 commit 71a5ced

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdks/python/apache_beam/metrics/cells.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,9 @@ def from_proto(proto: metrics_pb2.BoundedTrie) -> 'BoundedTrieData':
822822
return BoundedTrieData(
823823
bound=proto.bound,
824824
singleton=tuple(proto.singleton) if proto.singleton else None,
825-
root=_BoundedTrieNode.from_proto(proto.root) if proto.root else None)
825+
root=(
826+
_BoundedTrieNode.from_proto(proto.root)
827+
if proto.HasField('root') else None))
826828

827829
def as_trie(self):
828830
if self._root is not None:

0 commit comments

Comments
 (0)