From af151d5dba7025425bbd7315196145cd8fd69d3e Mon Sep 17 00:00:00 2001 From: Patrick Pichon Date: Tue, 3 Sep 2024 08:15:56 +0200 Subject: [PATCH] test only if not None --- Modules/pluginModels.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/pluginModels.py b/Modules/pluginModels.py index 1c9ec6485..239c2c846 100644 --- a/Modules/pluginModels.py +++ b/Modules/pluginModels.py @@ -51,9 +51,9 @@ def check_found_plugin_model( self, model, manufacturer_name=None, manufacturer_ continue if ( - ( "Manufacturer" in x and x["Manufacturer"] and manufacturer_name not in x["Manufacturer"] ) - or ( "ManufId" in x and x["ManufId"] and manufacturer_code not in x["ManufId"]) - or ( "DeviceID" in x and x["DeviceID"] and device_id not in x["DeviceID"] ) + ( "Manufacturer" in x and x["Manufacturer"] and manufacturer_name and manufacturer_name not in x["Manufacturer"] ) + or ( "ManufId" in x and x["ManufId"] and manufacturer_code and manufacturer_code not in x["ManufId"]) + or ( "DeviceID" in x and x["DeviceID"] and device_id and device_id not in x["DeviceID"] ) ): continue