resource as resource named1
This commit is contained in:
parent
2a9a784ec1
commit
20913f056b
@ -34,12 +34,12 @@ func (dma *AbstractAccessor) SetLogger(t DataType) {
|
||||
}
|
||||
|
||||
func (wfa *AbstractAccessor) GenericStoreOne(data DBObject, accessor Accessor) (DBObject, error) {
|
||||
data.GenerateID()
|
||||
err := validate.Struct(data)
|
||||
wfa.Logger.Error().Msg("Could not store " + data.GetName() + " to db. Error: " + err.Error())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
data.GenerateID()
|
||||
id, err := mongo.MONGOService.StoreOne(data, wfa.GetType())
|
||||
if err != nil {
|
||||
wfa.Logger.Error().Msg("Could not store " + data.GetName() + " to db. Error: " + err.Error())
|
||||
|
Loading…
Reference in New Issue
Block a user