Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/tk_multi_workfiles/actions/interactive_open_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def execute(self, parent_ui):
and (not self._workfiles_visible or not self.file.is_local)
):
# opening a publish and either not showing work files or the file isn't local
if self.file.version < max_publish_version:
if max_publish_version and self.file.version < max_publish_version:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that the change of behaviour between Python 2 and 3 with Int<None and I agree this fix makes sense.

However, I am unable to find a way to reproduce this problem.

I mean, if max_publish_version is None, that means there are no file_versions with is_published. In this situation, the condition on L54 (and self.file.is_published) will never pass so we never get to this line.

Would it be possible to provide reproduction steps for this issue, please?

# opening an old version of a publish!
return self._open_previous_publish(
self.file, self.environment, parent_ui
Expand All @@ -78,7 +78,7 @@ def execute(self, parent_ui):
# OR
# opening a file that is both local and published and both are visible in the view!
# (is this the right thing to do when a file is both local and a publish??)
if self.file.version < max_local_version:
if max_local_version and self.file.version < max_local_version:
# opening an old version of work file:
return self._open_previous_workfile(
self.file, self.environment, parent_ui
Expand Down