Skip to content

Commit

Permalink
Fix resource import error (#1136)
Browse files Browse the repository at this point in the history
* make audio/video speech association optional

* update package version
  • Loading branch information
an-lee authored Oct 18, 2024
1 parent 2f2c443 commit 61ad5cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion enjoy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"name": "enjoy",
"productName": "Enjoy",
"version": "0.6.0",
"version": "0.6.1-preview",
"description": "Enjoy desktop app",
"main": ".vite/build/main.js",
"types": "./src/types.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion enjoy/src/main/db/models/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ export class Audio extends Model<Audio> {
})
transcription: Transcription;

@BelongsTo(() => Speech, "md5")
@BelongsTo(() => Speech, {
foreignKey: "md5",
constraints: false,
})
speech: Speech;

@Default(0)
Expand Down
5 changes: 4 additions & 1 deletion enjoy/src/main/db/models/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ export class Video extends Model<Video> {
})
transcription: Transcription;

@BelongsTo(() => Speech, "md5")
@BelongsTo(() => Speech, {
foreignKey: "md5",
constraints: false,
})
speech: Speech;

@Default(0)
Expand Down

0 comments on commit 61ad5cc

Please sign in to comment.