mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +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")
|
flash("No download available.", "danger")
|
||||||
return redirect(package.getDetailsURL())
|
return redirect(package.getDetailsURL())
|
||||||
else:
|
else:
|
||||||
PackageRelease.query.filter_by(id=release.id).update({
|
return redirect(release.getDownloadURL(), code=302)
|
||||||
"downloads": PackageRelease.downloads + 1
|
|
||||||
})
|
|
||||||
db.session.commit()
|
|
||||||
|
|
||||||
return redirect(release.url, code=302)
|
|
||||||
|
|
||||||
|
|
||||||
class PackageForm(FlaskForm):
|
class PackageForm(FlaskForm):
|
||||||
|
Loading…
Reference in New Issue
Block a user