mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Apply suggestions from code review
Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
parent
093a649668
commit
c1b92cc9bd
1 changed files with 4 additions and 4 deletions
|
|
@ -959,13 +959,13 @@ class SceneInventoryView(QtWidgets.QTreeView):
|
|||
remove_container(container)
|
||||
self.data_changed.emit()
|
||||
|
||||
def _show_version_error_dialog(self, version, item_ids, exception=None):
|
||||
def _show_version_error_dialog(self, version, item_ids, exception):
|
||||
"""Shows QMessageBox when version switch doesn't work
|
||||
|
||||
Args:
|
||||
version: str or int or None
|
||||
item_ids (Iterable[str]): List of item ids to run the
|
||||
exception (Exception, optional): Exception that occurred
|
||||
exception (Exception): Exception that occurred
|
||||
"""
|
||||
if version == -1:
|
||||
version_str = "latest"
|
||||
|
|
@ -1110,10 +1110,10 @@ class SceneInventoryView(QtWidgets.QTreeView):
|
|||
container = containers_by_id[item_id]
|
||||
try:
|
||||
update_container(container, item_version)
|
||||
except Exception as e:
|
||||
except Exception as exc:
|
||||
log.warning("Update failed", exc_info=True)
|
||||
self._show_version_error_dialog(
|
||||
item_version, [item_id], e
|
||||
item_version, [item_id], exc
|
||||
)
|
||||
finally:
|
||||
# Always update the scene inventory view, even if errors occurred
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue