Skip to content

Commit

Permalink
fix Retention properties usage (#1066)
Browse files Browse the repository at this point in the history
Fixes #1065
  • Loading branch information
balamurugana authored Jan 27, 2021
1 parent 25be820 commit ecffd08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions minio/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ecffd08

Please sign in to comment.