We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5081c84 commit 572823fCopy full SHA for 572823f
minio/minioadmin.py
@@ -459,7 +459,7 @@ def policy_add(self,
459
"""Add new policy."""
460
if not (policy_file is not None) ^ (policy is not None):
461
raise ValueError("either policy_file or policy must be provided")
462
- body = policy
+ body = json.dumps(policy).encode() if policy else None
463
if policy_file:
464
with open(policy_file, encoding='utf-8') as file:
465
body = file.read().encode()
0 commit comments