mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 01:23:48 +01:00
Fix lack of download counter checks on non-release package download
This commit is contained in:
parent
a60786d32c
commit
325ee02b49
@ -164,12 +164,7 @@ def download(package):
|
||||
flash("No download available.", "danger")
|
||||
return redirect(package.getDetailsURL())
|
||||
else:
|
||||
PackageRelease.query.filter_by(id=release.id).update({
|
||||
"downloads": PackageRelease.downloads + 1
|
||||
})
|
||||
db.session.commit()
|
||||
|
||||
return redirect(release.url, code=302)
|
||||
return redirect(release.getDownloadURL(), code=302)
|
||||
|
||||
|
||||
class PackageForm(FlaskForm):
|
||||
|
Loading…
Reference in New Issue
Block a user