From ff0e6b95602ae53172b0208f458cb7904735ca24 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Thu, 9 May 2024 21:16:13 +0300 Subject: [PATCH] update get_products_menu_items > replace redundant code --- client/ayon_core/hosts/houdini/api/hda_utils.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/client/ayon_core/hosts/houdini/api/hda_utils.py b/client/ayon_core/hosts/houdini/api/hda_utils.py index 47f99112ed..9229bca55d 100644 --- a/client/ayon_core/hosts/houdini/api/hda_utils.py +++ b/client/ayon_core/hosts/houdini/api/hda_utils.py @@ -441,15 +441,12 @@ def get_products_menu_items(node): product_types=[my_product_type] ) - items = list(map(lambda p: p["name"], products)) + items = [] + for product in products: + items.append(product["name"]) + items.append(product["name"]) - result = [] - - for i in items: - result.append(i) - result.append(i) - - return(result) + return(items) def select_folder_path(node):