diff --git a/app/models/log.ts b/app/models/log.ts index 2849ec2b88..b7c148353e 100644 --- a/app/models/log.ts +++ b/app/models/log.ts @@ -12,7 +12,7 @@ export default class LogModel extends OsfModel { @belongsTo('node', { inverse: null }) node!: AsyncBelongsTo & NodeModel; - @belongsTo('node', { inverse: 'logs' }) + @belongsTo('node', { polymorphic: true, inverse: 'logs' }) originalNode!: AsyncBelongsTo & NodeModel; @belongsTo('user') diff --git a/app/models/wiki.ts b/app/models/wiki.ts index 623b70b790..111b84fee4 100644 --- a/app/models/wiki.ts +++ b/app/models/wiki.ts @@ -15,7 +15,7 @@ export default class WikiModel extends OsfModel { @attr('string') materializedPath!: string; @attr('number') size!: number; - @belongsTo('node', { inverse: 'wikis' }) + @belongsTo('node', { polymorphic: true, inverse: 'wikis' }) node!: AsyncBelongsTo & NodeModel; }