Browse Source

query-node: bug fix-remove videomedia when medialocation is removed

metmirr 4 years ago
parent
commit
06a2260037
1 changed files with 1 additions and 1 deletions
  1. 1 1
      query-node/mappings/content-directory/entity/remove.ts

+ 1 - 1
query-node/mappings/content-directory/entity/remove.ts

@@ -69,7 +69,7 @@ async function removeKnownLicense(db: DB, where: IWhereCond): Promise<void> {
 async function removeMediaLocation(db: DB, where: IWhereCond): Promise<void> {
   const record = await db.get(MediaLocationEntity, where)
   if (record === undefined) throw Error(`MediaLocation not found`)
-  if (record.videoMedia) await removeVideo(db, { where: { id: record.videoMedia.id } })
+  if (record.videoMedia) await removeVideoMedia(db, { where: { id: record.videoMedia.id } })
 
   const { httpMediaLocation, joystreamMediaLocation } = record