add condition to check if there is a current file

This commit is contained in:
Kayla Man 2024-05-22 22:49:21 +08:00
parent ddf75b5e89
commit 5e957c50c8

View file

@ -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)