From ecffd08aacb4653684f1287edc1713d80096b43c Mon Sep 17 00:00:00 2001 From: Bala FA Date: Wed, 27 Jan 2021 14:42:07 +0530 Subject: [PATCH] fix Retention properties usage (#1066) Fixes #1065 --- minio/helpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/minio/helpers.py b/minio/helpers.py index c7796a9ec..9ece115da 100644 --- a/minio/helpers.py +++ b/minio/helpers.py @@ -360,10 +360,10 @@ def genheaders(headers, sse, tags, retention, legal_hold): ) if tagging: headers["x-amz-tagging"] = tagging - if retention and retention.mode(): - headers["x-amz-object-lock-mode"] = retention.mode() + if retention and retention.mode: + headers["x-amz-object-lock-mode"] = retention.mode headers["x-amz-object-lock-retain-until-date"] = ( - to_iso8601utc(retention.retain_until_date()) + to_iso8601utc(retention.retain_until_date) ) if legal_hold: headers["x-amz-object-lock-legal-hold"] = "ON"