fix(releases): add null handling for new fields (#1892)

* fix(web): react fragment props warnings

* fix(releases): handle new NULL values
This commit is contained in:
ze0s 2024-12-26 01:04:39 +01:00 committed by GitHub
parent 9ae798c99a
commit 0cf704dba3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 13 additions and 10 deletions

View file

@ -367,7 +367,7 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain
var rls domain.Release
var ras domain.ReleaseActionStatus
var rlsIndexer, rlsIndexerName, rlsIndexerExternalName, rlsFilter, rlsAnnounceType, infoUrl, downloadUrl, subTitle, normalizedHash, codec, hdr, rlsType, audioStr, languageStr, editionStr, cutStr, website sql.NullString
var rlsIndexer, rlsIndexerName, rlsIndexerExternalName, rlsFilter, rlsAnnounceType, infoUrl, downloadUrl, subTitle, normalizedHash, codec, hdr, rlsType, audioStr, audioChannels, region, languageStr, editionStr, cutStr, website, mediaProcessing sql.NullString
var rlsIndexerID sql.NullInt64
var rasId, rasFilterId, rasReleaseId, rasActionId sql.NullInt64
@ -403,9 +403,9 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain
&rls.Container,
&hdr,
&audioStr,
&rls.AudioChannels,
&audioChannels,
&rls.Group,
&rls.Region,
&region,
&languageStr,
&editionStr,
&cutStr,
@ -413,7 +413,7 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain
&rls.Proper,
&rls.Repack,
&website,
&rls.MediaProcessing,
&mediaProcessing,
&rlsType,
&rls.Timestamp,
&rasId, &rasStatus, &rasAction, &rasActionId, &rasType, &rasClient, &rasFilter, &rasFilterId, &rasReleaseId, pq.Array(&rasRejections), &rasTimestamp, &resp.TotalCount,
@ -471,10 +471,13 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain
rls.Codec = strings.Split(codec.String, ",")
rls.HDR = strings.Split(hdr.String, ",")
rls.Audio = strings.Split(audioStr.String, ",")
rls.AudioChannels = audioChannels.String
rls.Language = strings.Split(languageStr.String, ",")
rls.Region = region.String
rls.Edition = strings.Split(editionStr.String, ",")
rls.Cut = strings.Split(cutStr.String, ",")
rls.Website = website.String
rls.MediaProcessing = mediaProcessing.String
//rls.Type = rlsType.String
if rlsType.Valid {
rls.ParseType(rlsType.String)