8000 Fix groups in post_init · AdrienVannson/python-betterproto@f8e7e54 · GitHub
[go: up one dir, main page]

Skip to content

Commit f8e7e54

Browse files
committed
Fix groups in post_init
1 parent 7138ff8 commit f8e7e54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/betterproto/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,10 @@ def __post_init__(self) -> None:
763763
if meta.group:
764764
group_current.setdefault(meta.group)
765765

766-
# value = self.__raw_get(field_name)
766+
value = self.__raw_get(field_name)
767+
if value is not None:
768+
group_current[meta.group] = field_name
769+
767770
# if value is not PLACEHOLDER and not (meta.optional and value is None):
768771
# # Found a non-sentinel value
769772
# all_sentinel = False

0 commit comments

Comments
 (0)
0