mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-09 02:23:54 +08:00
BUG: Make sure metadata_cache is created.
Fix issue where metadata_cache was missing causing an AttributeError.
This commit is contained in:
@@ -118,6 +118,10 @@ class AssetFinder(object):
|
||||
self.conn = sqlite3.connect(db_path)
|
||||
self.cursor = self.conn.cursor()
|
||||
|
||||
# The AssetFinder also holds a nested-dict of all metadata for
|
||||
# reference when building Assets
|
||||
self.metadata_cache = {}
|
||||
|
||||
# Create table and read in metadata.
|
||||
# Should we use flags like 'r', 'w', instead?
|
||||
# What we need to support is:
|
||||
@@ -126,10 +130,6 @@ class AssetFinder(object):
|
||||
# - A 'read' mode where the asset finder uses a prexisting db.
|
||||
if create_table:
|
||||
self.create_db_tables()
|
||||
|
||||
# The AssetFinder also holds a nested-dict of all metadata for
|
||||
# reference when building Assets
|
||||
self.metadata_cache = {}
|
||||
if metadata is not None:
|
||||
self.consume_metadata(metadata)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user