mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-30 12:01:00 +08:00
BUG: Raise SidsNotFound in retrieve_asset.
This commit is contained in:
@@ -364,7 +364,10 @@ class AssetFinder(object):
|
||||
Retrieve the Asset for a given sid.
|
||||
"""
|
||||
try:
|
||||
return self._asset_cache[sid]
|
||||
asset = self._asset_cache[sid]
|
||||
if asset is None and not default_none:
|
||||
raise SidsNotFound(sids=[sid])
|
||||
return asset
|
||||
except KeyError:
|
||||
return self.retrieve_all((sid,), default_none=default_none)[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user