validator err

This commit is contained in:
mr 2024-07-19 09:43:18 +02:00
parent 694957a483
commit 218714683b

View File

@ -1,8 +1,6 @@
package oclib
import (
"fmt"
"cloud.o-forge.io/core/oc-lib/dbs/mongo"
"cloud.o-forge.io/core/oc-lib/models/utils"
)
@ -21,7 +19,7 @@ func (wfa *WorkflowMongoAccessor) UpdateOne(set map[string]interface{}, id strin
func (wfa *WorkflowMongoAccessor) StoreOne(data utils.DBObject) (utils.DBObject, error) {
err := utils.Validate.Struct(data)
fmt.Println(err)
wfa.Logger.Error().Msg("Could not store " + data.GetName() + " to db. Error: " + err.Error())
if err != nil {
return nil, err
}