#1290 frontend: fix pagure-events so it submits correct packages
Merged 4 years ago by praiskup. Opened 4 years ago by praiskup.
Unknown source fix-pagure-events  into  master

@@ -78,6 +78,7 @@

      @classmethod

      def get_candidates_for_rebuild(cls, clone_url):

          rows = models.Package.query \

+             .join(models.CoprDir) \

              .filter(models.Package.source_type == SCM_SOURCE_TYPE) \

              .filter(models.Package.webhook_rebuild) \

              .filter(models.CoprDir.main) \

We need to use explicit join, so sqlalchemy does
.. FROM a JOIN b ON ...
instead of Cartesian product
.. FROM a, b ...

Fixes: #1288

rebased onto da16c64

4 years ago

Hotifxed in production, and tested on this PR (I touched the Rebase button, and new
build was spawned).

+1
I've tried the Rebase button and a new build has been spawned. Even with a pull request, it has no problem.

Pull-Request has been merged by praiskup

4 years ago