From f5c8f01da520d64e3d56728c8c9fcc148b848bcb Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 28 Apr 2025 16:41:06 +0200 Subject: [PATCH] pass host to workfiles model --- client/ayon_core/tools/workfiles/control.py | 2 +- client/ayon_core/tools/workfiles/models/workfiles.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/tools/workfiles/control.py b/client/ayon_core/tools/workfiles/control.py index 0bbec856ca..76a113097d 100644 --- a/client/ayon_core/tools/workfiles/control.py +++ b/client/ayon_core/tools/workfiles/control.py @@ -176,7 +176,7 @@ class BaseWorkfileController( return UsersModel(self) def _create_workfiles_model(self): - return WorkfilesModel(self) + return WorkfilesModel(self._host, self) def _create_expected_selection_obj(self): return WorkfilesToolExpectedSelection(self) diff --git a/client/ayon_core/tools/workfiles/models/workfiles.py b/client/ayon_core/tools/workfiles/models/workfiles.py index 7d56f02a2f..0be559fef4 100644 --- a/client/ayon_core/tools/workfiles/models/workfiles.py +++ b/client/ayon_core/tools/workfiles/models/workfiles.py @@ -91,7 +91,8 @@ class WorkareaModel: by host integration. """ - def __init__(self, controller): + def __init__(self, host, controller): + self._host = host self._controller = controller extensions = None if controller.is_host_valid(): @@ -741,11 +742,11 @@ class PublishWorkfilesModel: class WorkfilesModel: """Workfiles model.""" - def __init__(self, controller): + def __init__(self, host, controller): self._controller = controller self._entities_model = WorkfileEntitiesModel(controller) - self._workarea_model = WorkareaModel(controller) + self._workarea_model = WorkareaModel(host, controller) self._published_model = PublishWorkfilesModel(controller) def get_workfile_info(self, folder_id, task_id, filepath):