From 32daeffa8a0de245714d3a1940ceb29b58694adb Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sun, 12 Dec 2021 15:39:45 -0500 Subject: [PATCH] Post's discussion should always be present --- framework/core/js/src/common/models/Post.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/js/src/common/models/Post.ts b/framework/core/js/src/common/models/Post.ts index 074914181..48aaa0ca6 100644 --- a/framework/core/js/src/common/models/Post.ts +++ b/framework/core/js/src/common/models/Post.ts @@ -9,7 +9,7 @@ export default class Post extends Model { return Model.attribute('number').call(this); } discussion() { - return Model.hasOne('discussion').call(this); + return Model.hasOne('discussion').call(this) as Discussion; } createdAt() {