Let /refresh_metadata try to generate a thumbnail.
This commit is contained in:
parent
57355cb032
commit
a2906db06a
1 changed files with 6 additions and 0 deletions
|
@ -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'])
|
||||||
|
|
Loading…
Reference in a new issue