diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index 8ec3cb952..4325ce02a 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -1106,7 +1106,7 @@ func (d *DataBases) RemoveGroupFromUser(ctx, sCtx context.Context, groupID strin }) } c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cUserToSuperGroup) - _, err := c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$pull": groupID}) + _, err := c.UpdateOne(sCtx, bson.M{"user_id": userID}, bson.M{"$pull": bson.M{"group_id_list": groupID}}) if err != nil { return utils.Wrap(err, "UpdateOne transaction failed") }