Skip to content

Commit be4c164

Browse files
roblablakalzoo
authored andcommitted
Support field presence for in64 types
1 parent 286a6b9 commit be4c164

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/betterproto/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,8 @@ def to_dict(
10751075
if meta.proto_type in INT_64_TYPES:
10761076
if field_is_repeated:
10771077
output[cased_name] = [str(n) for n in value]
1078+
elif value is None:
1079+
output[cased_name] = value
10781080
else:
10791081
output[cased_name] = str(value)
10801082
elif meta.proto_type == TYPE_BYTES:

0 commit comments

Comments
 (0)