mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 01:23:48 +01:00
Fix not being able to delete cover image
This commit is contained in:
parent
fc3a481e6f
commit
dfa5d0c5a7
@ -157,6 +157,10 @@ def delete_screenshot(package, id):
|
||||
flash("Permission denied", "danger")
|
||||
return redirect(url_for("homepage.home"))
|
||||
|
||||
if package.cover_image == screenshot:
|
||||
package.cover_image = None
|
||||
db.session.merge(package)
|
||||
|
||||
db.session.delete(screenshot)
|
||||
db.session.commit()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user