mirror of https://github.com/stashapp/stash.git
Set movies studioId on create mutation (#511)
This commit is contained in:
parent
0e01177440
commit
2c85aeedf4
|
@ -64,6 +64,11 @@ func (r *mutationResolver) MovieCreate(ctx context.Context, input models.MovieCr
|
||||||
newMovie.Rating = sql.NullInt64{Int64: rating, Valid: true}
|
newMovie.Rating = sql.NullInt64{Int64: rating, Valid: true}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if input.StudioID != nil {
|
||||||
|
studioID, _ := strconv.ParseInt(*input.StudioID, 10, 64)
|
||||||
|
newMovie.StudioID = sql.NullInt64{Int64: studioID, Valid: true}
|
||||||
|
}
|
||||||
|
|
||||||
if input.Director != nil {
|
if input.Director != nil {
|
||||||
newMovie.Director = sql.NullString{String: *input.Director, Valid: true}
|
newMovie.Director = sql.NullString{String: *input.Director, Valid: true}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue