diff --git a/src/betterproto/__init__.py b/src/betterproto/__init__.py index da6893db7..c16e2cdd9 100644 --- a/src/betterproto/__init__.py +++ b/src/betterproto/__init__.py @@ -749,7 +749,7 @@ def __post_init__(self) -> None: group_current.setdefault(meta.group) value = self.__raw_get(field_name) - if value != PLACEHOLDER and not (meta.optional and value is None): + if value is not PLACEHOLDER and not (meta.optional and value is None): # Found a non-sentinel value all_sentinel = False