Skip to content

Commit

Permalink
Bug fix on loading and saving minio objs to non-default buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
fongcj committed Oct 9, 2024
1 parent 988d6a0 commit fa1dcb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/msk_cdm/minio/_minio_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def load_obj(
urllib3.response.HTTPResponse
"""
if self._bucket is not None:
if (self._bucket is not None) & (bucket_name is None):
bucket_name = self._bucket

obj = self._client.get_object(bucket_name, path_object)
Expand Down Expand Up @@ -108,7 +108,7 @@ def save_obj(
"""

if self._bucket is not None:
if (self._bucket is not None) & (bucket_name is None):
bucket_name = self._bucket

csv_bytes = df.to_csv(index=False, sep=sep).encode("utf-8")
Expand Down

0 comments on commit fa1dcb4

Please sign in to comment.