Skip to content

Commit

Permalink
Merge pull request #69 from MoonShineVFX/ple-1711
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
rebeccaLinx authored Jan 30, 2023
2 parents 66fcfdd + 060240b commit a85d372
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions avalon/tools/projectmanager/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def __init__(self, is_silo_project=None, parent=None):
assets.view.setSelectionMode(assets.view.ExtendedSelection)
add_episode = QtWidgets.QPushButton("Add episode")
add_sequence = QtWidgets.QPushButton("Add sequence")
add_asset = QtWidgets.QPushButton("Add asset")
add_asset = QtWidgets.QPushButton("Add asset/shot")
add_layout = QtWidgets.QHBoxLayout()
add_layout.addWidget(add_episode)
add_layout.addWidget(add_sequence)
Expand Down Expand Up @@ -419,11 +419,11 @@ def on_add_episode(self):
if not self.shotgrid_io:
self.shotgrid_io = shotgun_io.ShotgunIO()
shorgrid_data = self.shotgrid_io.sg.find_one(
"Project", [['tank_name', 'is', self.data["project"]["name"]]], ["id"])
"Project", [['tank_name', 'is', self.data["project"]["name"]]], ["id"]) or {}

dialog = EpisodeCreateDialog(
is_silo_required=self.is_silo_project, parent=self,
shotgrid_io=self.shotgrid_io, shotgrid_project_id=shorgrid_data["id"]
shotgrid_io=self.shotgrid_io, shotgrid_project_id=shorgrid_data.get("id", None)
)

def _on_episode_created(data):
Expand Down Expand Up @@ -482,11 +482,11 @@ def on_add_sequence(self):
if not self.shotgrid_io:
self.shotgrid_io = shotgun_io.ShotgunIO()
shorgrid_data = self.shotgrid_io.sg.find_one(
"Project", [['tank_name', 'is', self.data["project"]["name"]]], ["id"])
"Project", [['tank_name', 'is', self.data["project"]["name"]]], ["id"]) or {}

dialog = SequenceCreateDialog(
is_silo_required=self.is_silo_project, parent=self,
shotgrid_io=self.shotgrid_io, shotgrid_project_id=shorgrid_data["id"]
shotgrid_io=self.shotgrid_io, shotgrid_project_id=shorgrid_data.get("id", None)
)

def _on_sequence_created(data):
Expand Down Expand Up @@ -556,11 +556,11 @@ def on_add_asset(self):
if not self.shotgrid_io:
self.shotgrid_io = shotgun_io.ShotgunIO()
shorgrid_data = self.shotgrid_io.sg.find_one(
"Project", [['tank_name', 'is', self.data["project"]["name"]]], ["id"])
"Project", [['tank_name', 'is', self.data["project"]["name"]]], ["id"]) or {}

dialog = AssetCreateDialog(
is_silo_required=self.is_silo_project, parent=self,
shotgrid_io=self.shotgrid_io, shotgrid_project_id=shorgrid_data["id"]
shotgrid_io=self.shotgrid_io, shotgrid_project_id=shorgrid_data.get("id", None)
)
if self.is_silo_project:
dialog.set_silo_input_enable(
Expand Down

0 comments on commit a85d372

Please sign in to comment.