From 7e940cdfb1e6996abec903d572037f9d9b7e19fb Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sun, 15 Dec 2024 00:09:37 -0800 Subject: [PATCH] submissions: update ActionSubmissionUploaded --- pkg/service_internal/submissions.go | 3 +++ 1 file changed, 3 insertions(+) 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) }