This commit is contained in:
Erik Johnston 2018-01-16 14:32:56 +00:00
parent 307f88dfb6
commit 5dfc83704b
1 changed files with 10 additions and 7 deletions

View File

@ -84,10 +84,11 @@ class ThumbnailResource(Resource):
method, m_type): method, m_type):
media_info = yield self.store.get_local_media(media_id) media_info = yield self.store.get_local_media(media_id)
if not media_info or media_info["quarantined_by"]: if not media_info:
if media_info: respond_404(request)
logger.info("Media is quarantined") return
if media_info["quarantined_by"]:
logger.info("Media is quarantined")
respond_404(request) respond_404(request)
return return
@ -123,9 +124,11 @@ class ThumbnailResource(Resource):
desired_type): desired_type):
media_info = yield self.store.get_local_media(media_id) media_info = yield self.store.get_local_media(media_id)
if not media_info or media_info["quarantined_by"]: if not media_info:
if media_info["quarantined_by"]: respond_404(request)
logger.info("Media is quarantined") return
if media_info["quarantined_by"]:
logger.info("Media is quarantined")
respond_404(request) respond_404(request)
return return