Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version_up_current_workfile() doesn't return the first workfile name if there are no workfiles #1139

Open
2 tasks done
MustafaJafar opened this issue Feb 11, 2025 · 0 comments · May be fixed by #1141
Open
2 tasks done
Assignees
Labels
type: bug Something isn't working

Comments

@MustafaJafar
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior:

version_up_current_workfile() doesn't return the first workfile name if there are no workfiles.
It actually returns the second version as it version up two times.

new_workfile_path = version_up(last_workfile_path)
if os.path.exists(new_workfile_path):
new_workfile_path = version_up(new_workfile_path)

Expected Behavior:

.

Version

1.0.14

What platform you are running on?

Windows

Steps To Reproduce:

  1. Open an empty scene in any task with the correct AYON context and no previous workfiles.
  2. Run
from ayon_core.pipeline.context_tools import version_up_current_workfile
version_up_current_workfile()

Are there any labels you wish to add?

  • I have added the relevant labels to the bug report.

Relevant log output:

Additional context:

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
1 participant