From: Michael Tremer Date: Sun, 1 Mar 2015 22:10:47 +0000 (+0100) Subject: fireinfo: Fix profile validation when importing profiles X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=95ae21d106bcce29fb7ff383789fdea4829d0d09;p=ipfire.org.git fireinfo: Fix profile validation when importing profiles --- 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: