Skip to content

Commit ef4f491

Browse files
authored
chore: fix experimental blob repr without content_type (#1337)
1 parent db087b0 commit ef4f491

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bigframes/dataframe.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,11 +768,11 @@ def _repr_html_(self) -> str:
768768

769769
def obj_ref_rt_to_html(obj_ref_rt) -> str:
770770
obj_ref_rt_json = json.loads(obj_ref_rt)
771+
gcs_metadata = obj_ref_rt_json["objectref"]["details"][
772+
"gcs_metadata"
773+
]
771774
content_type = typing.cast(
772-
str,
773-
obj_ref_rt_json["objectref"]["details"]["gcs_metadata"][
774-
"content_type"
775-
],
775+
str, gcs_metadata.get("content_type", "")
776776
)
777777
if content_type.startswith("image"):
778778
url = obj_ref_rt_json["access_urls"]["read_url"]

0 commit comments

Comments
 (0)