Skip to content

Commit 61eeef4

Browse files
committed
🐛 Fix memoization
1 parent 763af4e commit 61eeef4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CPAC/pipeline/engine/resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3216,7 +3216,7 @@ def regressor_dct(self) -> dict:
32163216
If regressor dictionary does not exist in current strategy.
32173217
"""
32183218
# pylint: disable=attribute-defined-outside-init
3219-
if hasattr(self, "_regressor_dct"): # memoized
3219+
if hasattr(self, "_regressor_dct") and self._regressor_dct: # memoized
32203220
# pylint: disable=access-member-before-definition
32213221
return self._regressor_dct
32223222
key_error = KeyError(

0 commit comments

Comments
 (0)