completed is set to false when the model updates

This commit is contained in:
Quaternions 2024-11-27 17:27:44 -08:00
parent 680c21ca11
commit 1984dd00bc

View File

@ -120,6 +120,8 @@ func (svc *Service) PatchSubmissionModel(ctx context.Context, params api.PatchSu
pmap := datastore.Optional() pmap := datastore.Optional()
pmap.AddNotNil("asset_id", params.ModelID) pmap.AddNotNil("asset_id", params.ModelID)
pmap.AddNotNil("asset_version", params.VersionID) pmap.AddNotNil("asset_version", params.VersionID)
//always reset completed when model changes
pmap.Add("completed",false)
err := svc.DB.Submissions().Update(ctx, params.SubmissionID, pmap) err := svc.DB.Submissions().Update(ctx, params.SubmissionID, pmap)
return err return err
} }