remove unecessary code

This commit is contained in:
clement.hector 2022-09-19 18:48:27 +02:00
parent b3bedc7ce7
commit 9a9c29c70c

View file

@ -18,7 +18,7 @@ from openpype.client import (
create_project,
)
from openpype.pipeline import AvalonMongoDB
from openpype.settings import get_project_settings, get_anatomy_settings
from openpype.settings import get_project_settings
from openpype.modules.kitsu.utils.credentials import validate_credentials
@ -262,25 +262,20 @@ def write_project_to_op(project: dict, dbcon: AvalonMongoDB) -> UpdateOne:
# Update Zou
gazu.project.update_project(project)
project_attributes = get_anatomy_settings(project_name)['attributes']
if "x" in project["resolution"]:
resolutionWidth = int(project["resolution"].split("x")[0])
resolutionHeight = int(project["resolution"].split("x")[1])
else:
resolutionWidth = project_attributes['resolutionWidth']
resolutionHeight = project_attributes['resolutionHeight']
# Update data
project_data.update(
{
"code": project_code,
"fps": float(project["fps"]),
"resolutionWidth": resolutionWidth,
"resolutionHeight": resolutionHeight,
"zou_id": project["id"],
}
)
proj_res = project["resolution"]
if "x" in proj_res:
project_data['resolutionWidth'] = int(proj_res.split("x")[0])
project_data['resolutionHeight'] = int(proj_res.split("x")[1])
return UpdateOne(
{"_id": project_doc["_id"]},
{