[VOL-5464] optimization and err handling of new onu reboot flow
Change-Id: I8cf973ff511f72144d007ffe33c09f34626d158a
Signed-off-by: Akash Reddy Kankanala <akash.kankanala@radisys.com>
diff --git a/internal/pkg/devdb/onu_device_db.go b/internal/pkg/devdb/onu_device_db.go
index 96b8eb9..3cc782b 100755
--- a/internal/pkg/devdb/onu_device_db.go
+++ b/internal/pkg/devdb/onu_device_db.go
@@ -337,7 +337,7 @@
OnuDeviceDB.OnuSpecificMeDb[meClassID][meEntityID] = meAttributes
} else {
meAttribs, ok := OnuDeviceDB.OnuSpecificMeDb[meClassID][meEntityID]
- if !ok {
+ if !ok || meAttribs == nil {
OnuDeviceDB.OnuSpecificMeDb[meClassID][meEntityID] = make(me.AttributeValueMap)
OnuDeviceDB.OnuSpecificMeDb[meClassID][meEntityID] = meAttributes
} else {