Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
builds
WHERE
deleted_at IS NULL
+ AND
+ test IS FALSE
""",
)
packages ON builds.pkg_id = packages.id
WHERE
builds.deleted_at IS NULL
+ AND
+ builds.test IS FALSE
AND
packages.name = %s
ORDER BY
def get_recent(self, limit=None):
"""
- Returns the most recent builds
+ Returns the most recent (non-test) builds
"""
builds = self._get_builds("""
SELECT
builds
WHERE
deleted_at IS NULL
+ AND
+ test IS FALSE
ORDER BY
created_at DESC
LIMIT %s""",
builds
WHERE
deleted_at IS NULL
+ AND
+ test IS FALSE
AND
owner_id = %s
ORDER BY
users
LEFT JOIN
builds ON users.id = builds.owner_id
+ WHERE
+ builds.test IS FALSE
GROUP BY
users.id
ORDER BY
FROM
builds
WHERE
+ test IS FALSE
+ AND
owner_id = %s
""", self.id,
)