Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Bug: fix invalid avalon import #3418

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions openpype/lib/path_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
import six
import platform

from openpype.client import get_project
from openpype.settings import get_project_settings

from .anatomy import Anatomy
from .profiles_filtering import filter_profiles

import avalon.api

log = logging.getLogger(__name__)


Expand Down Expand Up @@ -204,9 +203,7 @@ def concatenate_splitted_paths(split_paths, anatomy):


def get_format_data(anatomy):
dbcon = avalon.api.AvalonMongoDB()
dbcon.Session["AVALON_PROJECT"] = anatomy.project_name
project_doc = dbcon.find_one({"type": "project"})
project_doc = get_project(anatomy.project_name, fields=["data.code"])
project_code = project_doc["data"]["code"]

return {
Expand Down