mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-15 12:37:18 +00:00
(cherry picked from commit 9ec424a3fad0f885861a1324b393a7eba71bd134)
This commit is contained in:
parent
ebe397d041
commit
ac6f726252
@ -35,7 +35,11 @@ def _get_json_text(key: str, text: bytes, decode: bool) -> Union[str, bytes]:
|
||||
with zipfile.ZipFile(io.BytesIO(text)) as zip_file:
|
||||
processed_text = zip_file.read(zip_file.infolist()[0])
|
||||
if decode:
|
||||
return processed_text.decode(UTF_8) if isinstance(text, bytes) else text
|
||||
return (
|
||||
processed_text.decode(UTF_8, errors="ignore")
|
||||
if isinstance(text, bytes)
|
||||
else text
|
||||
)
|
||||
return processed_text
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user