File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,17 +231,18 @@ def _save_artifact(
231231 content_type = "text/plain" ,
232232 )
233233 elif artifact .file_data :
234- if not artifact .file_data .file_uri :
234+ file_uri = artifact .file_data .file_uri
235+ if not file_uri :
235236 raise InputValidationError ("Artifact file_data must have a file_uri." )
236237 if artifact_util .is_artifact_ref (artifact ):
237- if not artifact_util .parse_artifact_uri (artifact . file_data . file_uri ):
238+ if not artifact_util .parse_artifact_uri (file_uri ):
238239 raise InputValidationError (
239- f"Invalid artifact reference URI: { artifact . file_data . file_uri } "
240+ f"Invalid artifact reference URI: { file_uri } "
240241 )
241242 # Store the URI as blob metadata; no content to upload.
242243 blob .metadata = {
243244 ** (blob .metadata or {}),
244- "file_uri" : artifact . file_data . file_uri ,
245+ "file_uri" : file_uri ,
245246 }
246247 blob .upload_from_string (
247248 b"" ,
You can’t perform that action at this time.
0 commit comments