stop asset submissions from erroring

master
Aevann 2023-03-18 07:42:34 +02:00
parent 335c572aaf
commit 2c95c75940
1 changed files with 3 additions and 0 deletions

View File

@ -260,6 +260,9 @@ def process_image(filename:str, v, resize=0, trim=False, uploader_id:Optional[in
db = db or g.db
media = db.query(Media).filter_by(filename=filename, kind='image').one_or_none()
if media: db.delete(media)
media = Media(
kind='image',
filename=filename,