Skip to content

Commit b2f899e

Browse files
committed
ensure distributedsearch parameter is persisted for link generation
1 parent cb44688 commit b2f899e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pycsw/ogc/api/records.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ def items(self, headers_, json_post_data, args, collection='metadata:main'):
818818
distributed = str2bool(args.get('distributedsearch', False))
819819

820820
if distributed:
821+
args.pop('distributedsearch')
821822
distributed_search = self.config.get('distributedsearch', {})
822823
merge_results = distributed_search.get('merge_results', False)
823824

@@ -833,7 +834,6 @@ def items(self, headers_, json_post_data, args, collection='metadata:main'):
833834
}
834835
try:
835836
w = Records(fc_url)
836-
args.pop('distributedsearch')
837837
fc_results = w.collection_items(fc_collection, **args)
838838
for feature in fc_results['features']:
839839
if merge_results:
@@ -849,6 +849,8 @@ def items(self, headers_, json_post_data, args, collection='metadata:main'):
849849
for key, value in fsrs.items():
850850
response['features'].extend(value['features'])
851851

852+
args['distributedSearch'] = 'true'
853+
852854
LOGGER.debug('Creating links')
853855

854856
link_args = {**args}

0 commit comments

Comments
 (0)