mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-01 16:35:02 +08:00
BUG: Fix bar data contains check when override is used.
The override should be used to filter out symbols not in the universe, however it was returning false positives. To remove the false positives, after the contains check passes, ensure that the key exists in the _data member.
This commit is contained in:
+4
-1
@@ -140,7 +140,10 @@ class BarData(object):
|
||||
|
||||
def __contains__(self, name):
|
||||
if self._contains_override:
|
||||
return self._contains_override(name)
|
||||
if self._contains_override(name):
|
||||
return name in self._data
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return name in self._data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user