From 1984dd00bc4ba0e7c6c590d5734b395b12bb3886 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 27 Nov 2024 17:27:44 -0800 Subject: [PATCH] completed is set to false when the model updates --- pkg/service/submissions.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/service/submissions.go b/pkg/service/submissions.go index ade2cc0..07c826a 100644 --- a/pkg/service/submissions.go +++ b/pkg/service/submissions.go @@ -120,6 +120,8 @@ func (svc *Service) PatchSubmissionModel(ctx context.Context, params api.PatchSu pmap := datastore.Optional() pmap.AddNotNil("asset_id", params.ModelID) 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) return err }