seba-260 - fixed some bugs
Change-Id: I214e2c11046a868156d6308d65160d99c9fd3ab2
diff --git a/internal/pkg/impl/ouput.go b/internal/pkg/impl/ouput.go
index aa2ea7e..739076b 100644
--- a/internal/pkg/impl/ouput.go
+++ b/internal/pkg/impl/ouput.go
@@ -24,7 +24,7 @@
"gerrit.opencord.org/abstract-olt/models"
"github.com/mongodb/mongo-go-driver/bson"
"github.com/mongodb/mongo-go-driver/mongo"
- "github.com/mongodb/mongo-go-driver/mongo/updateopt"
+ "github.com/mongodb/mongo-go-driver/options"
context "golang.org/x/net/context"
)
@@ -53,7 +53,8 @@
updateDoc := bson.NewDocument(bson.EC.SubDocument("$set", doc))
//update or insert if not existent
- res, err := collection.UpdateOne(context.Background(), filter, updateDoc, updateopt.Upsert(true))
+ upsert := true
+ res, err := collection.UpdateOne(context.Background(), filter, updateDoc, &options.UpdateOptions{Upsert: &upsert})
if err != nil {
log.Printf("collection.UpdateOne failed with %v\n", err)
} else {