Skip to content

Commit 155c685

Browse files
authored
Merge commit from fork
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
1 parent 833314c commit 155c685

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pkg/server/create_or_update_resource_v1alpha1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

pkg/server/create_resource_v1alpha1.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

pkg/server/update_resource_v1alpha1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)