mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 14:37:36 +01:00
Fix crash on profile with no pacakges
This commit is contained in:
parent
d17bd5580e
commit
d7c83f58b9
@ -70,7 +70,7 @@ def profile(username):
|
|||||||
total_downloads = db.session.query(func.sum(Package.downloads)) \
|
total_downloads = db.session.query(func.sum(Package.downloads)) \
|
||||||
.select_from(User) \
|
.select_from(User) \
|
||||||
.join(User.maintained_packages) \
|
.join(User.maintained_packages) \
|
||||||
.filter(User.id == user.id, Package.state == PackageState.APPROVED).scalar()
|
.filter(User.id == user.id, Package.state == PackageState.APPROVED).scalar() or 0
|
||||||
|
|
||||||
# Process GET or invalid POST
|
# Process GET or invalid POST
|
||||||
return render_template("users/profile.html", user=user, packages=packages,
|
return render_template("users/profile.html", user=user, packages=packages,
|
||||||
|
Loading…
Reference in New Issue
Block a user