mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fix database access in loader
This commit is contained in:
parent
786a6494eb
commit
f49d01559a
1 changed files with 4 additions and 1 deletions
|
|
@ -426,7 +426,10 @@ class FamilyConfigCache:
|
|||
# Make sure connection is installed
|
||||
# - accessing attribute which does not have auto-install
|
||||
self.dbcon.install()
|
||||
asset_doc = self.dbcon.database[project_name].find_one(
|
||||
database = getattr(self.dbcon, "database", None)
|
||||
if database is None:
|
||||
database = self.dbcon._database
|
||||
asset_doc = database[project_name].find_one(
|
||||
{"type": "asset", "name": asset_name},
|
||||
{"data.tasks": True}
|
||||
) or {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue