Skip to content

Commit

Permalink
frontend: specify local_attr and remote_attr
Browse files Browse the repository at this point in the history
See fedora-copr#3130

    sqlalchemy.exc.InvalidRequestError: No 'on clause' argument may be
    passed when joining to a relationship path as a target
  • Loading branch information
FrostyX committed Mar 3, 2024
1 parent a1a34e0 commit 9d4a41d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/coprs_frontend/coprs/logic/coprs_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def attach_build(cls, query):

@classmethod
def attach_mock_chroots(cls, query):
query = (query.outerjoin(*models.Copr.mock_chroots.attr)
query = (query
.outerjoin(models.Copr.mock_chroots.local_attr)
.outerjoin(models.Copr.mock_chroots.remote_attr)
.options(db.contains_eager(*models.Copr.mock_chroots.attr))
.order_by(models.MockChroot.os_release.asc())
.order_by(models.MockChroot.os_version.asc())
Expand Down

0 comments on commit 9d4a41d

Please sign in to comment.