resource as resource named1

This commit is contained in:
mr 2024-07-19 11:00:15 +02:00
parent 2a9a784ec1
commit 20913f056b

View File

@ -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())