Skip to content

Commit 2123b44

Browse files
committed
Do not allow fallback to __len__ for truthiness of Huey instance.
Fixes #859
1 parent bdfc143 commit 2123b44

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

huey/api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,9 @@ def all_results(self):
645645
def result_count(self):
646646
return self.storage.result_store_size()
647647

648+
def __bool__(self):
649+
return True
650+
648651
def __len__(self):
649652
return self.pending_count()
650653

0 commit comments

Comments
 (0)