]> git.ipfire.org Git - pbs.git/commitdiff
packages: Automatically load the distro when loading a package
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Jul 2025 15:00:28 +0000 (15:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Jul 2025 15:00:28 +0000 (15:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/packages.py

index fbb7063ba6cdfd9acc8db8b5712e3f17e071e39f..b319e63c55076c07b54b5eb03490de09ca0112e8 100644 (file)
@@ -434,7 +434,9 @@ class Package(sqlmodel.SQLModel, database.BackendMixin, database.SoftDeleteMixin
 
        # Distro
 
-       distro: "Distro" = sqlmodel.Relationship()
+       distro: "Distro" = sqlmodel.Relationship(
+               sa_relationship_kwargs={ "lazy" : "joined" },
+       )
 
        # Build ID