removing the check for no record found, throwing error. 66/13566/1
authorrajdeep11 <rajdeep.sin@samsung.com>
Wed, 9 Oct 2024 10:34:36 +0000 (16:04 +0530)
committerrajdeep11 <rajdeep.sin@samsung.com>
Wed, 9 Oct 2024 10:34:36 +0000 (16:04 +0530)
Change-Id: Ib2d00ca778ff96d833f4e7c4823b82e36dd6a8e2
Signed-off-by: rajdeep11 <rajdeep.sin@samsung.com>
apis/mmes_apis.go

index 482811e..693caed 100644 (file)
@@ -156,17 +156,6 @@ func (m *MmeApiHandler) GetModelInfo(cont *gin.Context) {
                                })
                                return
                        }
-                       //to check record not found
-                       if len(modelInfos)==0{
-                               statusCode := http.StatusNotFound
-                               errMessage := fmt.Sprintf("Record not found with modelName: %s", modelName)
-                               logging.ERROR("Record not found, send status code: ", statusCode)
-                               cont.JSON(statusCode, gin.H{
-                                       "code":    statusCode,
-                                       "message": errMessage,
-                               })
-                               return
-                       }
 
                        cont.JSON(http.StatusOK, gin.H{
                                "modelinfoList":modelInfos,