Skip to content

Commit

Permalink
fix set_bucket_notification filter (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
WaYdotNET authored and nitisht committed Jun 20, 2018
1 parent 1efa13d commit 6173c79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion minio/xml_marshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def _add_notification_config_to_xml(node, element_name, configs):
event_node = s3_xml.SubElement(config_node, 'Event')
event_node.text = event

filter_rules = config_node.get('Filter', {}).get(
filter_rules = config.get('Filter', {}).get(
'Key', {}).get('FilterRules', [])
if filter_rules:
filter_node = s3_xml.SubElement(config_node, 'Filter')
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/set_bucket_notification_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ def test_notification_config_filterspec_is_valid_7(self, mock_connection):
'PUT',
'https://localhost:9000/my-test-bucket/?notification=',
{
'Content-Md5': 'AGCNfbD5OuiyIJFd+r67MA==',
'Content-Md5': 'k97dHBBUq9MR7ZViy7oUsw==',
'User-Agent': _DEFAULT_USER_AGENT,
'Content-Length': '206',
'Content-Length': '300',
},
200, content=""
)
Expand Down Expand Up @@ -345,8 +345,8 @@ def test_notification_config_filterspec_is_valid_8(self, mock_connection):
'PUT',
'https://localhost:9000/my-test-bucket/?notification=',
{
'Content-Length': '206',
'Content-Md5': 'AGCNfbD5OuiyIJFd+r67MA==',
'Content-Length': '300',
'Content-Md5': '2aIwAt1lAd5JShphHCD4GA==',
'User-Agent': _DEFAULT_USER_AGENT,
},
200, content=""
Expand Down

0 comments on commit 6173c79

Please sign in to comment.