This commit is contained in:
mr
2026-02-05 14:25:26 +01:00
parent 342451db25
commit 5798e16263

View File

@@ -247,7 +247,7 @@ func (m *MongoDB) StoreOne(obj interface{}, id string, collection_name string) (
if err := m.createClient(mngoConfig.GetUrl(), false); err != nil { if err := m.createClient(mngoConfig.GetUrl(), false); err != nil {
return "", 503, err return "", 503, err
} }
var doc map[string]interface{} doc := map[string]interface{}{}
b, _ := bson.Marshal(obj) b, _ := bson.Marshal(obj)
bson.Unmarshal(b, &doc) bson.Unmarshal(b, &doc)
doc["_id"] = id doc["_id"] = id