]> git.ipfire.org Git - ipfire.org.git/commitdiff
fireinfo: Only validate a profile if we received one
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Jan 2024 17:15:16 +0000 (17:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Jan 2024 17:15:16 +0000 (17:15 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/fireinfo.py

index 647e89d75978951288c8456237fbb5aa4d3ed60a..a427fe8e531384e26692c5768a256c888a7e0523 100644 (file)
@@ -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)