handle empty model

This commit is contained in:
2025-11-12 23:15:08 +01:00
parent 8786280209
commit 0f75bc03e1
+4 -2
View File
@@ -36,8 +36,10 @@ def filter_link_pojo_list_with_model(_received_dict, link_to_validate_list):
if len(_links_filtered_by_model) > 0: if len(_links_filtered_by_model) > 0:
return _links_filtered_by_model return _links_filtered_by_model
else: else:
_to_return = filter(lambda link_pojo: link_pojo.model == _model, link_to_validate_list) _to_return = filter(lambda link_pojo: link_pojo.model == "", link_to_validate_list)
return list(_to_return) _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): class LinkValidatorWithProvidedList(threading.Thread):