Skip to content

Commit

Permalink
feat(func/imports/delete-import): Set import id in link table to null…
Browse files Browse the repository at this point in the history
… upon update
  • Loading branch information
shivam-tripathi committed Aug 11, 2018
1 parent 4a1e9b4 commit b01891f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/func/imports/delete-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export default async function deleteImport(

// Delete the link import record
await transacting('bookbrainz.link_import')
.where('import_id', importId).del();
.where('import_id', importId)
.update('importId', null);

// Finally delete the associated data and import table record
return Promise.all([
Expand Down

0 comments on commit b01891f

Please sign in to comment.