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

Commit

Permalink
fix delivery action variable and create directories
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubjezek001 committed Aug 10, 2020
1 parent 0b4e01e commit 1db9d9e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions pype/modules/ftrack/actions/action_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from pype.api import Anatomy
from pype.modules.ftrack.lib import BaseAction, statics_icon
from pype.modules.ftrack.lib.avalon_sync import CUST_ATTR_ID_KEY
from pype.modules.ftrack.lib.avalon_sync import CustAttrIdKey
from pype.modules.ftrack.lib.io_nonsingleton import DbConnector


Expand Down Expand Up @@ -228,12 +228,7 @@ def launch(self, session, entities, event):
if location_path:
location_path = os.path.normpath(location_path)
if not os.path.exists(location_path):
return {
"success": False,
"message": (
"Entered location path does not exists. \"{}\""
).format(location_path)
}
os.makedirs(location_path)

self.db_con.install()
self.db_con.Session["AVALON_PROJECT"] = project_name
Expand All @@ -245,7 +240,7 @@ def launch(self, session, entities, event):
version = entity["version"]

parent = asset["parent"]
parent_mongo_id = parent["custom_attributes"].get(CUST_ATTR_ID_KEY)
parent_mongo_id = parent["custom_attributes"].get(CustAttrIdKey)
if parent_mongo_id:
parent_mongo_id = ObjectId(parent_mongo_id)
else:
Expand Down

0 comments on commit 1db9d9e

Please sign in to comment.