From f5d1b623f41af5d514cc4967c38d6bd0076f32ff Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 11 May 2022 12:43:36 -0500 Subject: [PATCH] Add missing return when template version is not found --- coderd/organizations.go | 1 + 1 file changed, 1 insertion(+) diff --git a/coderd/organizations.go b/coderd/organizations.go index 686b526fa2e02..1796c8f9857a9 100644 --- a/coderd/organizations.go +++ b/coderd/organizations.go @@ -180,6 +180,7 @@ func (api *api) postTemplatesByOrganization(rw http.ResponseWriter, r *http.Requ httpapi.Write(rw, http.StatusNotFound, httpapi.Response{ Message: "template version does not exist", }) + return } if err != nil { httpapi.Write(rw, http.StatusInternalServerError, httpapi.Response{