From 2323026840eea0d2335fd818c7d46c1c7dbd0a0b Mon Sep 17 00:00:00 2001 From: achaulk-goog <107196446+achaulk-goog@users.noreply.github.com> Date: Mon, 24 Apr 2023 16:50:11 -0400 Subject: [PATCH] Update bridge app codegen to handle Optional<> (#26229) --- scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py b/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py index f48c5eac5cc080..5325ce8043f10e 100644 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py +++ b/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py @@ -88,7 +88,7 @@ def get_field_type(definition: Field, cluster: Cluster, idl: Idl): cType = 'std::vector<{}>'.format(cType) if definition.is_nullable: cType = '::chip::app::DataModel::Nullable<{}>'.format(cType) - if definition.is_nullable: + if definition.is_optional: cType = '::chip::Optional<{}>'.format(cType) return cType