From 3e65a528f1716dd122a51121c20f4ef85073954f Mon Sep 17 00:00:00 2001 From: pluto <2631223275@qq.com> Date: Fri, 4 Aug 2023 18:36:19 +0800 Subject: [PATCH] update --- pkg/common/db/unrelation/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/unrelation/user.go b/pkg/common/db/unrelation/user.go index 8460259cc..4f1bbd017 100644 --- a/pkg/common/db/unrelation/user.go +++ b/pkg/common/db/unrelation/user.go @@ -50,7 +50,7 @@ func (u *UserMongoDriver) AddSubscriptionList(ctx context.Context, userID string // Check the number of lists in the key. pipeline := mongo.Pipeline{ {{"$match", bson.D{{"user_id", SubscriptionPrefix + userID}}}}, - {{"$project", bson.D{{"count", bson.D{{"$size", "user_id_list"}}}}}}, + {{"$project", bson.D{{"count", bson.D{{"$size", "$user_id_list"}}}}}}, } // perform aggregate operations cursor, err := u.userCollection.Aggregate(ctx, pipeline)