Skip to content

Commit ee7c55b

Browse files
Fix sync command in dynamic folder mode
1 parent e96dae3 commit ee7c55b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cloudinary_cli/utils/api_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ def query_cld_folder(folder, folder_mode):
2525
files = {}
2626

2727
folder = folder.strip('/') # omit redundant leading slash and duplicate trailing slashes in query
28+
folder_key = "asset_folder" if folder_mode == "dynamic" else "folder"
2829
folder_query = f"{folder}/*" if folder else "*"
2930

30-
expression = Search().expression(f"folder:\"{folder_query}\"").with_field("image_analysis").max_results(500)
31+
expression = Search().expression(f"{folder_key}:\"{folder_query}\"").with_field("image_analysis").max_results(500)
3132

3233
next_cursor = True
3334
while next_cursor:

0 commit comments

Comments
 (0)