mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-06 05:14:38 +08:00
BUG: Fix exception on no symbol with fuzzy enabled
If there is no symbol there should be no fuzzy lookup either.
This commit is contained in:
@@ -750,8 +750,11 @@ class AssetFinder(object):
|
||||
# Build an Asset of the appropriate type, default to Equity
|
||||
asset_type = entry.pop('asset_type', 'equity')
|
||||
if asset_type.lower() == 'equity':
|
||||
fuzzy = entry['symbol'].replace(self.fuzzy_char, '') \
|
||||
if self.fuzzy_char else None
|
||||
try:
|
||||
fuzzy = entry['symbol'].replace(self.fuzzy_char, '') \
|
||||
if self.fuzzy_char else None
|
||||
except KeyError:
|
||||
fuzzy = None
|
||||
asset = Equity(**entry)
|
||||
c = self.conn.cursor()
|
||||
t = (asset.sid,
|
||||
|
||||
Reference in New Issue
Block a user