diff --git a/pkg/service_internal/submissions.go b/pkg/service_internal/submissions.go index bc27f1a..e4fefb5 100644 --- a/pkg/service_internal/submissions.go +++ b/pkg/service_internal/submissions.go @@ -47,5 +47,8 @@ func (svc *Service) ActionSubmissionUploaded(ctx context.Context, params interna // transaction smap := datastore.Optional() 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) }