Skip to content

Commit

Permalink
small fixes and improvements (#171)
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Mészáros <[email protected]>
  • Loading branch information
csviri authored Jan 7, 2025
1 parent 6bc6896 commit 4aa349e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private boolean deletedGlueIfParentMarkedForDeletion(Context<Glue> context, Glue
private UpdateControl<Glue> removeErrorMessageFromGlueStatusIfPresent(Glue primary) {
if (primary.getStatus() != null && primary.getStatus().getErrorMessage() != null) {
primary.getStatus().setErrorMessage(null);
primary.getMetadata().setResourceVersion(null);
return UpdateControl.patchStatus(primary);
} else {
return UpdateControl.noUpdate();
Expand Down Expand Up @@ -274,8 +275,10 @@ private void patchRelatedResourcesStatus(Context<Glue> context,
genericTemplateHandler.processTemplate(actualData, template, objectTemplate);
var statusObjectMap = GenericTemplateHandler.parseTemplateToMapObject(resultTemplate);
relatedResources.forEach((n, kr) -> {
kr.setAdditionalProperty("status", statusObjectMap);
context.getClient().resource(kr).patchStatus();
if (kr != null) {
kr.setAdditionalProperty("status", statusObjectMap);
context.getClient().resource(kr).patchStatus();
}
});
});

Expand Down

0 comments on commit 4aa349e

Please sign in to comment.