#2366 frontend: pass a list of projects instead of a query
Merged a year ago by praiskup. Opened a year ago by frostyx.
copr/ frostyx/copr user-recent-projects  into  main

@@ -81,7 +81,7 @@ 

      if flask.g.user and not pinned:

          recent = CoprsLogic.get_multiple_owned_by_username(flask.g.user.username)

          recent = CoprsLogic.set_query_order(recent, desc=True)

-         recent = recent.limit(4)

+         recent = recent.limit(4).all()

  

      projects_count = CoprsLogic.get_multiple().count()

      # users_count = models.User.query.count()

Our logic in templates/coprs/show/all.html is to show pinned
projects if there are any. If not, show a user's recent projects if
there are any. The condition was always true though because we passed
a flask_sqlalchemy.BaseQuery object to the template instead of the
list of projects.

Build succeeded.

Commit a679637 fixes this pull-request

Pull-Request has been merged by praiskup

a year ago