From 0f75bc03e14a415e824d40588f95e68e5e0c6818 Mon Sep 17 00:00:00 2001 From: Lei PAN Date: Wed, 12 Nov 2025 23:15:08 +0100 Subject: [PATCH] handle empty model --- workers/link_validator_with_provided_list.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workers/link_validator_with_provided_list.py b/workers/link_validator_with_provided_list.py index 0b1b447..1158da5 100644 --- a/workers/link_validator_with_provided_list.py +++ b/workers/link_validator_with_provided_list.py @@ -36,8 +36,10 @@ def filter_link_pojo_list_with_model(_received_dict, link_to_validate_list): if len(_links_filtered_by_model) > 0: return _links_filtered_by_model else: - _to_return = filter(lambda link_pojo: link_pojo.model == _model, link_to_validate_list) - return list(_to_return) + _to_return = filter(lambda link_pojo: link_pojo.model == "", link_to_validate_list) + _list_with_empty_model = list(_to_return) + print("link with empty model list size after filter = {}".format(len(_list_with_empty_model))) + return _list_with_empty_model class LinkValidatorWithProvidedList(threading.Thread):