submissions: update ActionSubmissionUploaded

This commit is contained in:
Quaternions 2024-12-15 00:09:37 -08:00
parent 47c30ad2db
commit 7e940cdfb1

View File

@ -47,5 +47,8 @@ func (svc *Service) ActionSubmissionUploaded(ctx context.Context, params interna
// transaction // transaction
smap := datastore.Optional() smap := datastore.Optional()
smap.Add("status_id", model.StatusUploaded) smap.Add("status_id", model.StatusUploaded)
if params.TargetAssetID.IsSet() {
smap.AddNotNil("target_asset_id", params.TargetAssetID.Value)
}
return svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.Status{model.StatusUploading}, smap) return svc.DB.Submissions().IfStatusThenUpdate(ctx, params.SubmissionID, []model.Status{model.StatusUploading}, smap)
} }