reflect code review

This commit is contained in:
Felix Kunde
2020-03-06 17:18:28 +01:00
parent 23cb1c0d50
commit 9390ae3630
3 changed files with 3 additions and 8 deletions
+2 -6
View File
@@ -51,13 +51,9 @@ func (c *Controller) listClusters(options metav1.ListOptions) (*acidv1.Postgresq
c.logger.Debugf("watch only clusters with controllerID %q", c.controllerID)
}
for _, pg := range list.Items {
if pg.Error != "" {
continue
if pg.Error == "" && c.hasOwnership(&pg) {
pgList.Items = append(pgList.Items, pg)
}
if !c.hasOwnership(&pg) {
continue
}
pgList.Items = append(pgList.Items, pg)
}
return &pgList, err