From 8e5a899e0e78a23d4fdaeda1b5ec4bc39b0f1797 Mon Sep 17 00:00:00 2001 From: Adam Saleh Date: Tue, 30 Nov 2021 10:51:21 +0100 Subject: [PATCH] Hotfix that is supposed to fix #4302 Signed-off-by: Adam Saleh (cherry picked from commit b823b93a2bef8a01b8d1ca014073e6fa7db24fd7) --- bodhi/server/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bodhi/server/models.py b/bodhi/server/models.py index c2506cc22a..7f6699046d 100644 --- a/bodhi/server/models.py +++ b/bodhi/server/models.py @@ -1918,8 +1918,8 @@ class Update(Base): # One-to-many relationships comments = relationship('Comment', backref='update', cascade="all,delete,delete-orphan", - order_by='Comment.timestamp') - builds = relationship('Build', backref='update', order_by='Build.nvr') + order_by='Comment.timestamp', lazy='joined') + builds = relationship('Build', backref='update', order_by='Build.nvr', lazy='joined') # Many-to-many relationships bugs = relationship('Bug', secondary=update_bug_table, backref='updates', order_by='Bug.bug_id')