Let /refresh_metadata try to generate a thumbnail.

master
voussoir 2017-07-09 15:45:10 -07:00
parent 57355cb032
commit a2906db06a
1 changed files with 6 additions and 0 deletions

View File

@ -672,6 +672,12 @@ def post_photo_refresh_metadata(photoid):
response = etiquette.jsonify.exception(e)
response = jsonify.make_json_response(response, status=400)
flask.abort(response)
if photo.thumbnail is None:
try:
photo.generate_thumbnail()
except Exception:
traceback.print_exc()
return jsonify.make_json_response({})
@site.route('/photo/<photoid>/remove_tag', methods=['POST'])