File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ func (s *server) CreateOrUpdateResource(
5656 }
5757 // If we just created a Project successfully, keep track of this Project
5858 // being one that was created in the course of this API call.
59- if result .CreatedResourceManifest != nil && resource .GroupVersionKind () == projectGVK {
59+ if err == nil && result .CreatedResourceManifest != nil && resource .GroupVersionKind () == projectGVK {
6060 createdProjects [resource .GetName ()] = struct {}{}
6161 }
6262 // Convert to protobuf result
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ func (s *server) CreateResource(
6464 }
6565 // If we just created a Project successfully, keep track of this Project
6666 // being one that was created in the course of this API call.
67- if resource .GroupVersionKind () == projectGVK {
67+ if err == nil && resource .GroupVersionKind () == projectGVK {
6868 createdProjects [resource .GetName ()] = struct {}{}
6969 }
7070 // Convert to protobuf result
@@ -158,7 +158,7 @@ func (s *server) createResources(c *gin.Context) {
158158 }
159159 // If we just created a Project successfully, keep track of this Project
160160 // being one that was created in the course of this API call.
161- if resource .GroupVersionKind () == projectGVK {
161+ if err == nil && resource .GroupVersionKind () == projectGVK {
162162 createdProjects [resource .GetName ()] = struct {}{}
163163 }
164164 results = append (results , result )
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ func (s *server) updateResources(c *gin.Context) {
133133 }
134134 // If we just created a Project successfully, keep track of this Project
135135 // being one that was created in the course of this API call.
136- if result .CreatedResourceManifest != nil && resource .GroupVersionKind () == projectGVK {
136+ if err == nil && result .CreatedResourceManifest != nil && resource .GroupVersionKind () == projectGVK {
137137 createdProjects [resource .GetName ()] = struct {}{}
138138 }
139139 results = append (results , result )
You can’t perform that action at this time.
0 commit comments