Skip to content

Commit 31ecb69

Browse files
committed
Fixed data-generator creating invalid parent_id column values
no issue - using `undefined` creates `EMPTY` values instead of `NULL` meaning our API queries to fetch top-level comments fail to find any comments
1 parent 35adc0a commit 31ecb69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ghost/core/core/server/data/seeders/importers/CommentsImporter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class CommentsImporter extends TableImporter {
5757
id: this.fastFakeObjectId(),
5858
post_id: this.model.id,
5959
member_id: this.possibleMembers[faker.datatype.number(this.possibleMembers.length - 1)].id,
60-
parent_id: isReply ? this.commentIds[faker.datatype.number(this.commentIds.length - 1)] : undefined,
60+
parent_id: isReply ? this.commentIds[faker.datatype.number(this.commentIds.length - 1)] : null,
6161
status: 'published',
6262
created_at: dateToDatabaseString(timestamp),
6363
updated_at: dateToDatabaseString(timestamp),

0 commit comments

Comments
 (0)