From 4b219626ebb179d95b578b85e2f224031c86227e Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Mon, 23 Aug 2021 14:46:53 +0200 Subject: [PATCH] Fixed usage of bson-objectid no-issue Calling ObjectId doesn't return a string a but an ObjectId object. Whilst this object is cast to a string via the toJSON and toString methods, this is not enough for MySQL. Instead we should explicitly cast this to a string ourselves and the application level. --- ghost/members-api/lib/repositories/member.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/members-api/lib/repositories/member.js b/ghost/members-api/lib/repositories/member.js index 0d03c7fb97..ad02a20ffc 100644 --- a/ghost/members-api/lib/repositories/member.js +++ b/ghost/members-api/lib/repositories/member.js @@ -400,7 +400,7 @@ module.exports = class MemberRepository { return { member_id: id, label_id: data.meta.label.id, - id: ObjectId() + id: ObjectId().toHexString() }; });