Skip to content

Commit

Permalink
[16.0][MIG] attachment_minio
Browse files Browse the repository at this point in the history
  • Loading branch information
abenzbiria committed Jul 4, 2024
1 parent 3a9d1ea commit 2dbb137
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion attachment_minio/models/ir_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def _get_minio_client(self):
)
if not all((host, access_key, secret_key)):
raise exceptions.UserError("Incorrect configuration of attachment_minio.")
print("hostttttttttt", host)
return Minio(
host,
access_key=access_key,
Expand All @@ -59,7 +60,8 @@ def _get_minio_bucket(self, client, name=None):
"Incorrect configuration of attachment_minio -- Missing bucket."
)
if not client.bucket_exists(bucket):
region = params.get_param("ir_attachment.location.region", "us-west-1")
region = (params.get_param("ir_attachment.location.region", "us-west-1") or
config.get("attachment_minio_region", "us-west-1"))
client.make_bucket(bucket, region)
return bucket

Expand Down

0 comments on commit 2dbb137

Please sign in to comment.