From a1950afd98de23dfeedd0719b24da0aa91145017 Mon Sep 17 00:00:00 2001 From: AHMET YILMAZ Date: Mon, 22 Sep 2025 17:19:27 +0800 Subject: [PATCH] #1505 fix(api): update config handling to only set base config if not provided by user --- deploy/docker/api.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deploy/docker/api.py b/deploy/docker/api.py index 850f5fd6..9f4f34f6 100644 --- a/deploy/docker/api.py +++ b/deploy/docker/api.py @@ -469,10 +469,13 @@ async def handle_crawl_request( # await crawler.start() base_config = config["crawler"]["base_config"] - # Iterate on key-value pairs in global_config then use haseattr to set them + # Iterate on key-value pairs in global_config then use hasattr to set them for key, value in base_config.items(): if hasattr(crawler_config, key): - setattr(crawler_config, key, value) + current_value = getattr(crawler_config, key) + # Only set base config if user didn't provide a value + if current_value is None or current_value == "": + setattr(crawler_config, key, value) results = [] func = getattr(crawler, "arun" if len(urls) == 1 else "arun_many")