From a3c175dbc442c25ff1c9a5920883eca716529f62 Mon Sep 17 00:00:00 2001 From: Yuhuai Liu Date: Wed, 25 Oct 2023 10:41:51 -0400 Subject: [PATCH] set inverse to null --- app/models/file.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/file.ts b/app/models/file.ts index 9eceb34e00a..8cf55e6d3ba 100644 --- a/app/models/file.ts +++ b/app/models/file.ts @@ -57,7 +57,7 @@ export default class FileModel extends BaseFileItem { @hasMany('comment', { inverse: null }) comments!: AsyncHasMany; - @belongsTo('osf-model', { polymorphic: true }) + @belongsTo('osf-model', { inverse: null, polymorphic: true }) // eslint-disable-next-line max-len target!: (AsyncBelongsTo & AbstractNodeModel) | (AsyncBelongsTo & PreprintModel) | (AsyncBelongsTo & DraftNode);