Skip to content

Commit

Permalink
Make relationships polymorphic (#1928)
Browse files Browse the repository at this point in the history
## Purpose

Make registrations load on basket/barium release

## Summary of Changes

1. Make relationships polymorphic
  • Loading branch information
brianjgeiger authored Aug 14, 2023
1 parent 323e8bc commit 0202a02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default class LogModel extends OsfModel {
@belongsTo('node', { inverse: null })
node!: AsyncBelongsTo<NodeModel> & NodeModel;

@belongsTo('node', { inverse: 'logs' })
@belongsTo('node', { polymorphic: true, inverse: 'logs' })
originalNode!: AsyncBelongsTo<NodeModel> & NodeModel;

@belongsTo('user')
Expand Down
2 changes: 1 addition & 1 deletion app/models/wiki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> & NodeModel;
}

Expand Down

0 comments on commit 0202a02

Please sign in to comment.