mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +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)) \
|
||||
.select_from(User) \
|
||||
.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
|
||||
return render_template("users/profile.html", user=user, packages=packages,
|
||||
|
Loading…
Reference in New Issue
Block a user