Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Clear outdated optimized image representations when reuploading a vis…
…ual submission
  • Loading branch information
charmander committed Feb 13, 2020
1 parent 921454c commit 7bb7168
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions weasyl/submission.py
Expand Up @@ -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):
Expand Down

0 comments on commit 7bb7168

Please sign in to comment.