1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 06:33:48 +00:00

Handle error in image view

This commit is contained in:
zhengxie
2015-01-19 12:09:28 +08:00
parent 1f8d391267
commit e6081aead5

View File

@@ -1923,7 +1923,11 @@ def toggle_modules(request):
storage = get_avatar_file_storage()
def latest_entry(request, filename):
return storage.modified_time(filename)
try:
return storage.modified_time(filename)
except Exception as e:
logger.error(e)
return None
@condition(last_modified_func=latest_entry)
def image_view(request, filename):