mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 01:23:48 +01:00
Fix outdated packages page query
This commit is contained in:
parent
09f8302e74
commit
53babc1113
@ -182,9 +182,10 @@ def view_user(username=None):
|
||||
@bp.route("/todo/outdated/")
|
||||
@login_required
|
||||
def outdated():
|
||||
outdated_packages = Package.query \
|
||||
.filter(Package.state == PackageState.APPROVED,
|
||||
Package.update_config.has(PackageUpdateConfig.outdated_at.isnot(None)))\
|
||||
.order_by(db.desc(PackageUpdateConfig.outdated_at)).all()
|
||||
outdated_packages = db.session.query(Package).select_from(PackageUpdateConfig) \
|
||||
.filter(PackageUpdateConfig.outdated_at.isnot(None)) \
|
||||
.order_by(db.desc(PackageUpdateConfig.outdated_at)) \
|
||||
.join(PackageUpdateConfig.package) \
|
||||
.filter(Package.state == PackageState.APPROVED).all()
|
||||
|
||||
return render_template("todo/outdated.html", current_tab="outdated", outdated_packages=outdated_packages)
|
||||
|
@ -1,12 +1,10 @@
|
||||
{% extends "todo/todo_base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ _("Outdated packages") }}
|
||||
{{ _("All Outdated packages") }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>{{ self.title() }}</h2>
|
||||
|
||||
{% from "macros/todo.html" import render_outdated_packages %}
|
||||
{{ render_outdated_packages(outdated_packages) }}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user