Add validation for only single folder products selection

This commit is contained in:
Petr Kalis 2025-08-21 18:07:19 +02:00
parent dc987ed64f
commit 651fc3f068

View file

@ -28,6 +28,10 @@ class PushToProject(load.ProductLoaderPlugin):
if not filtered_contexts: if not filtered_contexts:
raise LoadError("Nothing to push for your selection") raise LoadError("Nothing to push for your selection")
folder_ids = [context["folder"]["id"] for context in filtered_contexts]
if len(folder_ids) > 1:
raise LoadError("Please select products from single folder")
push_tool_script_path = os.path.join( push_tool_script_path = os.path.join(
AYON_CORE_ROOT, AYON_CORE_ROOT,
"tools", "tools",