From d2fc7748fe89fced0120dd1a04345e7c3877c023 Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Sun, 7 Jul 2019 06:37:17 -0700 Subject: [PATCH] FIX `attachment_minio` Cannot delete attachments. --- attachment_minio/__manifest__.py | 7 +++++-- attachment_minio/models/ir_attachment.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/attachment_minio/__manifest__.py b/attachment_minio/__manifest__.py index 89d7402b..5b7c2f32 100755 --- a/attachment_minio/__manifest__.py +++ b/attachment_minio/__manifest__.py @@ -7,12 +7,15 @@ "author": "Hibou Corp.", "license": "AGPL-3", "description": """ -# Use MinIO (or Amazon S3) for Attachment/filestore +################################################# +Use MinIO (or Amazon S3) for Attachment/filestore +################################################# MinIO provides S3 API compatible storage to scale out without a shared filesystem like NFS. -## Setup details +Setup details +############# Before installing this app, you should add several System Parameters. diff --git a/attachment_minio/models/ir_attachment.py b/attachment_minio/models/ir_attachment.py index 8e5dbba5..599c3d83 100644 --- a/attachment_minio/models/ir_attachment.py +++ b/attachment_minio/models/ir_attachment.py @@ -93,7 +93,7 @@ class MinioAttachment(models.Model): # Cannot delete unparsable file return True bucket_name = s3uri.bucket() - if bucket_name == self._get_s3_bucket(client): + if bucket_name == self._get_minio_bucket(client): try: client.remove_object(bucket_name, s3uri.item()) except NoSuchKey: