mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +01:00
Fix tag counts including unapproved packages
This commit is contained in:
parent
35afd50f3d
commit
1659802ff3
@ -95,7 +95,8 @@ def list_all():
|
|||||||
topics = qb.buildTopicQuery().all()
|
topics = qb.buildTopicQuery().all()
|
||||||
|
|
||||||
tags_query = db.session.query(func.count(Tags.c.tag_id), Tag) \
|
tags_query = db.session.query(func.count(Tags.c.tag_id), Tag) \
|
||||||
.select_from(Tag).join(Tags).join(Package).group_by(Tag.id).order_by(db.asc(Tag.title))
|
.select_from(Tag).join(Tags).join(Package).filter(Package.state==PackageState.APPROVED) \
|
||||||
|
.group_by(Tag.id).order_by(db.asc(Tag.title))
|
||||||
tags = qb.filterPackageQuery(tags_query).all()
|
tags = qb.filterPackageQuery(tags_query).all()
|
||||||
|
|
||||||
selected_tags = set(qb.tags)
|
selected_tags = set(qb.tags)
|
||||||
|
Loading…
Reference in New Issue
Block a user