]> git.ipfire.org Git - pbs.git/commitdiff
database: Replace more occurences of the UUID type
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Jul 2023 15:11:52 +0000 (15:11 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Jul 2023 15:11:52 +0000 (15:11 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/builders.py
src/buildservice/builds.py
src/buildservice/jobs.py
src/web/uploads.py

index c412073d45c675e330ff1ebe062f80e9a072b3a6..753e34198a868201464bda26c60988cbd583662c 100644 (file)
@@ -827,7 +827,7 @@ class Builder(base.DataObject):
                        "type" : "job",
                        "data" : {
                                # Add job information
-                               "id"      : job.uuid,
+                               "id"      : "%s" % job.uuid,
                                "name"    : "%s" % job,
                                "arch"    : job.arch,
 
index bd22f117fea40bba9879ac035e69c92962fe13ba..d702946ed8f629a222d262171bc91dcc0762b9a1 100644 (file)
@@ -1313,7 +1313,7 @@ class Group(base.DataObject):
        table = "build_groups"
 
        def __str__(self):
-               return self.uuid
+               return "%s" % self.uuid
 
        def __iter__(self):
                return iter(self.builds)
index 9db4d90cb368711df1d2b7e3159880a3ca00f3dd..52736240e6890eb3cdff300b4bdceb4734c1b636 100644 (file)
@@ -791,13 +791,15 @@ class Job(base.DataObject):
                return q
 
        async def _import_logfile(self, upload):
+               uuid = "%s" % self.uuid
+
                # Create some destination path
                path = self.backend.path(
                        "logs",
                        "jobs",
-                       self.uuid[0:2],
-                       self.uuid[2:4],
-                       "%s.log.gz" % self.uuid[4:],
+                       uuid[0:2],
+                       uuid[2:4],
+                       "%s.log.gz" % uuid[4:],
                )
 
                # Create parent directory
index 0b15a6b1cc1d531b77093a50b85e91a50205d870..70e3b4c0fa5a3af514d5b103a53dd7d0408d5b03 100644 (file)
@@ -102,7 +102,7 @@ class APIv1IndexHandler(base.APIMixin, tornado.web.RequestHandler):
 
                # Send the ID of the upload back to the client
                self.finish({
-                       "id"         : upload.uuid,
+                       "id"         : "%s" % upload.uuid,
                        "expires_at" : upload.expires_at.isoformat(),
                })