]> git.ipfire.org Git - pbs.git/commitdiff
release monitoring: Do not try to update a bug that has never been created
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 5 Aug 2023 10:11:43 +0000 (10:11 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 5 Aug 2023 10:11:43 +0000 (10:11 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/releasemonitoring.py

index 6306fa03bfa122a08fe3bdf36537cdcfe09d504b..7ba6308bfd40afe112c045bdcb88da5183ff9b67 100644 (file)
@@ -847,6 +847,10 @@ class Release(base.DataObject):
                # Fetch the bug report
                bug = await self.get_bug()
 
+               # Do nothing if there is no bug
+               if not bug:
+                       return
+
                # If the build has been successful, ...
                if self.build.is_successful():
                        await bug.update(comment=BUG_BUILD_SUCCESSFUL)