Post's discussion should always be present

This commit is contained in:
Alexander Skvortsov 2021-12-12 15:39:45 -05:00
parent f469bcfcd7
commit 32daeffa8a

View File

@ -9,7 +9,7 @@ export default class Post extends Model {
return Model.attribute<number>('number').call(this);
}
discussion() {
return Model.hasOne<Discussion>('discussion').call(this);
return Model.hasOne<Discussion>('discussion').call(this) as Discussion;
}
createdAt() {