Not creating batch ID when no movies are to be stored.
This commit is contained in:
parent
fe5daefd61
commit
d8b8dfa299
|
@ -357,6 +357,10 @@ async function associateMovieScenes(movies, movieScenes) {
|
|||
}
|
||||
|
||||
async function storeMovies(movies, movieScenes) {
|
||||
if (movies.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const { uniqueReleases } = await filterDuplicateReleases(movies);
|
||||
const [batchId] = await knex('batches').insert({ comment: null }).returning('id');
|
||||
|
||||
|
|
Loading…
Reference in New Issue