Serialize failures

This commit is contained in:
mr
2024-07-24 09:53:30 +02:00
parent c5f4427f9f
commit 637b2c977d
8 changed files with 7 additions and 11 deletions

View File

@@ -3,7 +3,6 @@ package mongo
import (
"context"
"errors"
"fmt"
"time"
"cloud.o-forge.io/core/oc-lib/dbs"
@@ -172,7 +171,6 @@ func (m *MongoDB) UpdateOne(set interface{}, id string, collection_name string)
targetDBCollection := CollectionMap[collection_name]
MngoCtx, cancel = context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
fmt.Println(doc)
_, err := targetDBCollection.UpdateOne(MngoCtx, filter, dbs.InputToBson(doc, true))
if err != nil {
m.Logger.Error().Msg("Couldn't update resource: " + err.Error())