use client query function 'get_project'

This commit is contained in:
Jakub Trllo 2022-06-27 14:23:42 +02:00
parent 8aa5770c0c
commit aa9183b2c2

View file

@ -6,13 +6,12 @@ import logging
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
from openpype.pipeline import AvalonMongoDB
log = logging.getLogger(__name__)
@ -204,9 +203,7 @@ def concatenate_splitted_paths(split_paths, anatomy):
def get_format_data(anatomy):
dbcon = 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 {