]> git.ipfire.org Git - pbs.git/commitdiff
builds: Fix rendering comments
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Oct 2022 09:50:10 +0000 (09:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Oct 2022 09:50:10 +0000 (09:50 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/builds.py

index 7a0c45503cc5a484d1ad7e08b9025094b1e95eb5..7d730e920ebce1273f83251a749baf5fd62adcdc 100644 (file)
@@ -224,6 +224,12 @@ class Builds(base.Object):
 
                return build
 
+       # Comments
+
+       @lazy_property
+       def comments(self):
+               return Comments(self.backend)
+
 
 class Build(base.DataObject):
        table = "builds"
@@ -494,9 +500,10 @@ class Build(base.DataObject):
                                build_comments
                        WHERE
                                deleted IS FALSE
-                       WHERE
+                       AND
                                build_id = %s
-                       ORDER BY created_at
+                       ORDER BY
+                               created_at
                        """, self.id,
                )