FIX attachment_minio Cannot delete attachments.

This commit is contained in:
Jared Kipe
2019-07-07 06:37:17 -07:00
parent 3aa2819880
commit d2fc7748fe
2 changed files with 6 additions and 3 deletions

View File

@@ -7,12 +7,15 @@
"author": "Hibou Corp.", "author": "Hibou Corp.",
"license": "AGPL-3", "license": "AGPL-3",
"description": """ "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. 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. Before installing this app, you should add several System Parameters.

View File

@@ -93,7 +93,7 @@ class MinioAttachment(models.Model):
# Cannot delete unparsable file # Cannot delete unparsable file
return True return True
bucket_name = s3uri.bucket() bucket_name = s3uri.bucket()
if bucket_name == self._get_s3_bucket(client): if bucket_name == self._get_minio_bucket(client):
try: try:
client.remove_object(bucket_name, s3uri.item()) client.remove_object(bucket_name, s3uri.item())
except NoSuchKey: except NoSuchKey: