Skip to content

Commit

Permalink
Set serialized_on_wire when parsing
Browse files Browse the repository at this point in the history
This is similar to the fix at danielgtaylor#81, but that doesn't merge into our branch because our branch is too old. So this just pulls in the relevant fix part.
  • Loading branch information
FuegoFro committed Jun 4, 2020
1 parent 47e1071 commit 3b3cf17
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions betterproto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ def parse(self: T, data: bytes) -> T:
fields = {f.metadata["betterproto"].number: f for f in dataclasses.fields(self)}
for parsed in parse_fields(data):
if parsed.number in fields:
self._serialized_on_wire = True
field = fields[parsed.number]
meta = FieldMetadata.get(field)

Expand Down

0 comments on commit 3b3cf17

Please sign in to comment.