RichardW98 commented on code in PR #350:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/350#discussion_r1461290932


##########
controllers/profiles/common/ensurer.go:
##########
@@ -66,22 +67,10 @@ func (d *defaultObjectEnsurer) Ensure(ctx context.Context, 
workflow *operatorapi
        result := controllerutil.OperationResultNone
 
        object, err := d.creator(workflow)
-       if err != nil {
+       if err != nil || object == nil {
                return nil, result, err

Review Comment:
   the reason I put return here for 'object==nil' is cuz if the it is nil, then 
we don't need to ensure it and also don't need to append it to objs in state



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to