diff --git a/client/ayon_traypublisher/plugins/create/create_csv_ingest.py b/client/ayon_traypublisher/plugins/create/create_csv_ingest.py index 9f566dd..55e77ca 100644 --- a/client/ayon_traypublisher/plugins/create/create_csv_ingest.py +++ b/client/ayon_traypublisher/plugins/create/create_csv_ingest.py @@ -55,7 +55,7 @@ def _get_row_value_with_validation( # get column default value column_default = column_data["default"] - if column_type in ["number", "decimal"] and column_default == 0: + if column_type in ["number", "decimal"] and column_default in (0, '0'): column_default = None # check if column value is not empty string @@ -779,7 +779,11 @@ def _create_instances_from_csv_data(self, csv_dir: str, filename: str): product_item.product_type, product_item.variant ) - label: str = f"{folder_path}_{product_name}_v{version:>03}" + + if version is not None: + label: str = f"{folder_path}_{product_name}_v{version:>03}" + else: + label: str = f"{folder_path}_{product_name}_v[next]" repre_items: List[RepreItem] = product_item.repre_items first_repre_item: RepreItem = repre_items[0] diff --git a/server/settings/creator_plugins.py b/server/settings/creator_plugins.py index 0e7963a..9fca980 100644 --- a/server/settings/creator_plugins.py +++ b/server/settings/creator_plugins.py @@ -182,7 +182,7 @@ class TrayPublisherCreatePluginsModel(BaseSettingsModel): "type": "text", "default": "", "required_column": True, - "validation_pattern": "^([a-zA-Z\\:\\ 0-9#._\\\\/]*)$" + "validation_pattern": "^([a-zA-Z\\:\\ 0-9#\\-\\._\\\\/]*)$" }, { "name": "Folder Path", @@ -215,8 +215,8 @@ class TrayPublisherCreatePluginsModel(BaseSettingsModel): { "name": "Version", "type": "number", - "default": "1", - "required_column": True, + "default": "0", + "required_column": False, "validation_pattern": "^(\\d{1,3})$" }, { @@ -231,7 +231,7 @@ class TrayPublisherCreatePluginsModel(BaseSettingsModel): "type": "text", "default": "", "required_column": False, - "validation_pattern": "^([a-zA-Z\\:\\ 0-9#._\\\\/]*)$" + "validation_pattern": "^([a-zA-Z\\:\\ 0-9#\\-\\._\\\\/]*)$" }, { "name": "Frame Start",