File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -451,6 +451,7 @@ def _default_content_type(blob_name: str):
451451 else :
452452 # found the blob - return it
453453 assert isinstance (blob , BlobFile )
454+ log (f"Materials blob: directly returning { bucket } :{ name } " )
454455 return FileResponse (
455456 blob ,
456457 filename = name ,
@@ -473,17 +474,20 @@ def _default_content_type(blob_name: str):
473474 if doc .type_id != bucket :
474475 raise Document .DoesNotExist
475476 except Document .DoesNotExist :
477+ log (f"Materials blob: no doc for { bucket } :{ name } " )
476478 return HttpResponseNotFound (
477479 f"Document corresponding to { bucket } :{ name } not found."
478480 )
479481 else :
480482 # create all missing blobs for the doc while we're at it
483+ log (f"Materials blob: storing blobs for { doc .name } -{ doc .rev } " )
481484 store_blobs_for_one_material_doc (doc )
482485
483486 # If we can make the blob at all, it now exists, so return it or a 404
484487 try :
485488 blob = storage .open (name , "rb" )
486489 except FileNotFoundError :
490+ log (f"Materials blob: no blob for { bucket } :{ name } " )
487491 return HttpResponseNotFound (f"Object { bucket } :{ name } not found." )
488492 else :
489493 # found the blob - return it
You can’t perform that action at this time.
0 commit comments