Fix bulk movie update ()

This commit is contained in:
DingDongSoLong4 2023-09-20 03:11:27 +02:00 committed by GitHub
parent 3aa3515b9c
commit 7ba7df052d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -415,9 +415,9 @@ func (t changesetTranslator) updateMovieIDsBulk(value *BulkUpdateIds, field stri
return nil, fmt.Errorf("converting ids [%v]: %w", value.Ids, err) return nil, fmt.Errorf("converting ids [%v]: %w", value.Ids, err)
} }
movies := make([]models.MoviesScenes, len(value.Ids)) movies := make([]models.MoviesScenes, len(ids))
for _, id := range ids { for i, id := range ids {
movies = append(movies, models.MoviesScenes{MovieID: id}) movies[i] = models.MoviesScenes{MovieID: id}
} }
return &models.UpdateMovieIDs{ return &models.UpdateMovieIDs{