Fix lack of download counter checks on non-release package download

This commit is contained in:
rubenwardy 2020-02-23 20:14:56 +00:00
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):