]> git.ipfire.org Git - pbs.git/commitdiff
builds: Drop unused function
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 May 2023 18:45:16 +0000 (18:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 May 2023 18:45:16 +0000 (18:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/builds.py

index 16714f600c3d808327069788b2db77b09dc36053..9116f9ced58d64cd036e46874825f4541e519a4f 100644 (file)
@@ -67,40 +67,6 @@ class Builds(base.Object):
                        """, uuid,
                )
 
-       def get_by_name(self, name, type=None, user=None, limit=None, offset=None):
-               args = [name,]
-               conditions = [
-                       "packages.name = %s",
-               ]
-
-               if type:
-                       conditions.append("builds.type = %s")
-                       args.append(type)
-
-               or_conditions = []
-               if user and not user.is_admin():
-                       or_conditions.append("builds.owner_id = %s")
-                       args.append(user.id)
-
-               query = "SELECT builds.* AS id FROM builds \
-                       JOIN packages ON builds.pkg_id = packages.id"
-
-               if or_conditions:
-                       conditions.append(" OR ".join(or_conditions))
-
-               if conditions:
-                       query += " WHERE %s" % " AND ".join(conditions)
-
-               if type == "release":
-                       query += " ORDER BY packages.name,packages.epoch,packages.version,packages.release,id ASC"
-               elif type == "scratch":
-                       query += " ORDER BY created_at DESC"
-
-               query += " LIMIT %s OFFSET %s"
-               args.extend([offset, limit])
-
-               return [Build(self.backend, b.id, b) for b in self.db.query(query, *args)]
-
        def get_latest_by_name(self, name):
                """
                        Returns the latest build that matches the package name