From 5e957c50c8aeba2a89a5049ca154e670c22d8412 Mon Sep 17 00:00:00 2001 From: Kayla Man Date: Wed, 22 May 2024 22:49:21 +0800 Subject: [PATCH] add condition to check if there is a current file --- client/ayon_core/hosts/maya/api/lib.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/ayon_core/hosts/maya/api/lib.py b/client/ayon_core/hosts/maya/api/lib.py index 59b8cfeb16..204f851b2b 100644 --- a/client/ayon_core/hosts/maya/api/lib.py +++ b/client/ayon_core/hosts/maya/api/lib.py @@ -3392,8 +3392,12 @@ def set_colorspace(): def version_up_workfile(): + """Function to increment and save workfile + """ host = registered_host() current_file = host.get_current_workfile() + if not current_file: + return None filepath = version_up(current_file) host.save_workfile(filepath)