From: Michael Tremer Date: Wed, 10 Jan 2024 17:15:16 +0000 (+0000) Subject: fireinfo: Only validate a profile if we received one X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c6cd062f5a6196b58bdd38d0336ea1cef6757bd;p=ipfire.org.git fireinfo: Only validate a profile if we received one Signed-off-by: Michael Tremer --- diff --git a/src/backend/fireinfo.py b/src/backend/fireinfo.py index 647e89d7..a427fe8e 100644 --- a/src/backend/fireinfo.py +++ b/src/backend/fireinfo.py @@ -820,11 +820,12 @@ class Fireinfo(Object): # Extract the profile profile = blob.get("profile") - # Validate the profile - self._validate(profile_id, version, profile) + if profile: + # Validate the profile + self._validate(profile_id, version, profile) - # Pre-process the profile - profile = self._preprocess(profile) + # Pre-process the profile + profile = self._preprocess(profile) # Fetch the previous profile prev = self.get_profile(profile_id)