validator err
This commit is contained in:
parent
694957a483
commit
218714683b
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user