Let /refresh_metadata try to generate a thumbnail.

This commit is contained in:
voussoir 2017-07-09 15:45:10 -07:00
parent 57355cb032
commit a2906db06a

View file

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