From 95ae21d106bcce29fb7ff383789fdea4829d0d09 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 1 Mar 2015 23:10:47 +0100 Subject: [PATCH] fireinfo: Fix profile validation when importing profiles --- webapp/backend/fireinfo.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webapp/backend/fireinfo.py b/webapp/backend/fireinfo.py index 09396dea..68da9a43 100644 --- a/webapp/backend/fireinfo.py +++ b/webapp/backend/fireinfo.py @@ -72,6 +72,9 @@ class ProfileDict(object): class ProfileNetwork(ProfileDict): def __eq__(self, other): + if other is None: + return False + if not self.has_red == other.has_red: return False @@ -1235,6 +1238,10 @@ class ProfileParser(Object): for arg in self.__device_args: args[arg] = _device.get(arg, None) + # Skip if the subsystem is not set + if not args.get("subsystem", None): + continue + # Find the device or create a new one. device = self.fireinfo.get_device(**args) if not device: -- 2.47.3