From 711e3d6e2fc46ff91f93aeccb4d2e2427f510b73 Mon Sep 17 00:00:00 2001 From: Priyanshu Thapliyal Date: Wed, 25 Dec 2024 14:57:21 +0530 Subject: [PATCH] fix(measurement): streamline Valid method to check Extensions for measurement values --- comid/measurement.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/comid/measurement.go b/comid/measurement.go index 45fd182..ef1d23d 100644 --- a/comid/measurement.go +++ b/comid/measurement.go @@ -436,11 +436,9 @@ func (o Mval) Valid() error { o.SerialNumber == nil && o.UEID == nil && o.UUID == nil && - o.IntegrityRegisters == nil { - - if o.Extensions.IsEmpty() { - return fmt.Errorf("no measurement value set") - } + o.IntegrityRegisters == nil && + o.Extensions.IsEmpty() { + return fmt.Errorf("no measurement value set") } if o.Ver != nil {