generate_link: warn when GCS blob can't be found.
This commit is contained in:
@@ -307,6 +307,8 @@ def generate_link(backend, file_path, project_id=None, is_public=False):
|
|||||||
storage = GoogleCloudStorageBucket(project_id)
|
storage = GoogleCloudStorageBucket(project_id)
|
||||||
blob = storage.Get(file_path)
|
blob = storage.Get(file_path)
|
||||||
if blob is None:
|
if blob is None:
|
||||||
|
log.warning('generate_link(%r, %r): unable to find blob for file path,'
|
||||||
|
' returning empty link.', backend, file_path)
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
if is_public:
|
if is_public:
|
||||||
|
Reference in New Issue
Block a user