Skip to content

Commit 26ffe52

Browse files
committed
Implement being able to iterate on self.conditions
1 parent 86d8420 commit 26ffe52

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crossplane/pythonic/composite.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,12 @@ def __getitem__(self, type):
450450
return Condition(self, type)
451451

452452
def __bool__(self):
453-
return bool(self._types())
453+
if self._response is not None:
454+
if self._response.conditions:
455+
return True
456+
if self._observed.resource.status.conditions:
457+
return True
458+
return False
454459

455460
def __len__(self):
456461
return len(self._types())

0 commit comments

Comments
 (0)