Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pycsw/stac/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ def items(self, headers_, json_post_data, args, collection='metadata:main'):
links2 = []

for link in response2.get('links', []):
if json_post_data is not None:
LOGGER.debug('Adding link body')
if json_post_data:
LOGGER.debug('Adding link method and body')
link['method'] = 'POST'
link['body'] = json_post_data

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ def test_items(config):
assert 'href' in link
assert 'rel' in link
assert 'metadata:main' not in link['href']
assert 'method' not in link
assert 'body' not in link

# test GET KVP requests
content = json.loads(api.items({}, None, {'bbox': '-180,-90,180,90'})[2])
Expand Down