0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

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.
This commit is contained in:
Fabien O'Carroll 2021-08-23 14:46:53 +02:00
parent 2b15530e82
commit 4b219626eb

View file

@ -400,7 +400,7 @@ module.exports = class MemberRepository {
return {
member_id: id,
label_id: data.meta.label.id,
id: ObjectId()
id: ObjectId().toHexString()
};
});