diff --git a/src/betterproto/__init__.py b/src/betterproto/__init__.py index da6893d..c16e2cd 100644 --- a/src/betterproto/__init__.py +++ b/src/betterproto/__init__.py @@ -749,7 +749,7 @@ class Message(ABC): 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