submissions: update ActionSubmissionUploaded
This commit is contained in:
parent
47c30ad2db
commit
7e940cdfb1
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user