mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-25 15:31:37 +01:00
Fix "featured" being used instead of "spotlight" on homepage
This commit is contained in:
parent
954826f053
commit
4df15d6ff2
@ -538,7 +538,7 @@ def homepage():
|
|||||||
count = query.count()
|
count = query.count()
|
||||||
|
|
||||||
spotlight = query.filter(
|
spotlight = query.filter(
|
||||||
Package.collections.any(and_(Collection.name == "featured", Collection.author.has(username="ContentDB")))) \
|
Package.collections.any(and_(Collection.name == "spotlight", Collection.author.has(username="ContentDB")))) \
|
||||||
.order_by(func.random()).limit(6).all()
|
.order_by(func.random()).limit(6).all()
|
||||||
new = query.order_by(db.desc(Package.approved_at)).limit(4).all()
|
new = query.order_by(db.desc(Package.approved_at)).limit(4).all()
|
||||||
pop_mod = query.filter_by(type=PackageType.MOD).order_by(db.desc(Package.score)).limit(8).all()
|
pop_mod = query.filter_by(type=PackageType.MOD).order_by(db.desc(Package.score)).limit(8).all()
|
||||||
|
@ -52,7 +52,7 @@ def home():
|
|||||||
count = query.count()
|
count = query.count()
|
||||||
|
|
||||||
spotlight_pkgs = query.filter(
|
spotlight_pkgs = query.filter(
|
||||||
Package.collections.any(and_(Collection.name == "featured", Collection.author.has(username="ContentDB")))) \
|
Package.collections.any(and_(Collection.name == "spotlight", Collection.author.has(username="ContentDB")))) \
|
||||||
.order_by(func.random()).limit(6).all()
|
.order_by(func.random()).limit(6).all()
|
||||||
|
|
||||||
new = package_load(query.order_by(db.desc(Package.approved_at))).limit(4).all()
|
new = package_load(query.order_by(db.desc(Package.approved_at))).limit(4).all()
|
||||||
|
Loading…
Reference in New Issue
Block a user