Skip to content
Permalink
Browse files

Clear outdated optimized image representations when reuploading a vis…

…ual submission
  • Loading branch information
charmander committed Feb 13, 2020
1 parent 921454c commit 7bb71689ffe636071759b71d23d91b216d5896f2
Showing with 4 additions and 0 deletions.
  1. +4 −0 weasyl/submission.py
@@ -543,6 +543,10 @@ def reupload(userid, submitid, submitfile):
file_type=submit_file_type,
im=generated_thumb)
orm.SubmissionMediaLink.make_or_replace_link(submitid, 'thumbnail-generated', generated_thumb_media_item)
d.engine.execute(
"UPDATE submission SET image_representations = NULL WHERE submitid = %(id)s",
id=submitid,
)


def select_view(userid, submitid, rating, ignore=True, anyway=None):

0 comments on commit 7bb7168

Please sign in to comment.
You can’t perform that action at this time.