diff --git a/src/app/CommandHandlerImpl.cpp b/src/app/CommandHandlerImpl.cpp index 2d8e76441bb083..2142af63494348 100644 --- a/src/app/CommandHandlerImpl.cpp +++ b/src/app/CommandHandlerImpl.cpp @@ -393,8 +393,8 @@ Status CommandHandlerImpl::ProcessCommandDataIB(CommandDataIB::Parser & aCommand { DataModel::InvokeRequest request; - request.path = concretePath; - request.subjectDescriptor = GetSubjectDescriptor(); + request.path = concretePath; + request.subjectDescriptor = GetSubjectDescriptor(); request.invokeFlags.Set(DataModel::InvokeFlags::kTimed, IsTimedInvoke()); Status preCheckStatus = mpCallback->ValidateCommandCanBeDispatched(request); @@ -515,8 +515,8 @@ Status CommandHandlerImpl::ProcessGroupCommandDataIB(CommandDataIB::Parser & aCo { DataModel::InvokeRequest request; - request.path = concretePath; - request.subjectDescriptor = GetSubjectDescriptor(); + request.path = concretePath; + request.subjectDescriptor = GetSubjectDescriptor(); request.invokeFlags.Set(DataModel::InvokeFlags::kTimed, IsTimedInvoke()); Status preCheckStatus = mpCallback->ValidateCommandCanBeDispatched(request); diff --git a/src/app/data-model-provider/OperationTypes.h b/src/app/data-model-provider/OperationTypes.h index bef7b6f3f3281c..6bfffccc655f00 100644 --- a/src/app/data-model-provider/OperationTypes.h +++ b/src/app/data-model-provider/OperationTypes.h @@ -61,7 +61,8 @@ struct OperationRequest /// This is a readability convenience function. /// /// Returns kUndefinedFabricIndex if no subject descriptor is available - FabricIndex GetAccessingFabricIndex() const { + FabricIndex GetAccessingFabricIndex() const + { return subjectDescriptor.has_value() ? subjectDescriptor->fabricIndex : kUndefinedFabricIndex; } };