diff --git a/dlt/sources/rest_api/__init__.py b/dlt/sources/rest_api/__init__.py index a634dee0e8..fcc6d6b52f 100644 --- a/dlt/sources/rest_api/__init__.py +++ b/dlt/sources/rest_api/__init__.py @@ -411,12 +411,11 @@ def paginate_dependent_resource( def _validate_config(config: RESTAPIConfig) -> None: c = deepcopy(config) _mask_client_config_auth(c.get("client")) - resources = c.get("resources") - if resources: - for resource in resources: - if isinstance(resource, str) or isinstance(resource, DltResource): - continue - _mask_client_config_auth(resource.get("client")) + resources = c.get("resources", []) + for resource in resources: + if isinstance(resource, str) or isinstance(resource, DltResource): + continue + _mask_client_config_auth(resource.get("client")) validate_dict(RESTAPIConfig, c, path=".")