Skip to content

Commit 500cf20

Browse files
committed
fix
1 parent 0ec6812 commit 500cf20

File tree

4 files changed

+583
-3
lines changed

4 files changed

+583
-3
lines changed

pycsw/ogc/csw/csw2.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ def getrecords(self):
714714
LOGGER.debug('OpenSearch Geo/Time parameters to Filter: %s.', self.parent.kvp['constraint'])
715715

716716
if self.parent.requesttype == 'GET':
717+
print("GET")
717718
if 'constraint' in self.parent.kvp:
718719
# GET request
719720
LOGGER.debug('csw:Constraint passed over HTTP GET.')
@@ -751,6 +752,7 @@ def getrecords(self):
751752
return self.exceptionreport('InvalidParameterValue',
752753
'constraint', 'Invalid Filter query: %s' % errortext)
753754
else:
755+
print("NOT GET")
754756
self.parent.kvp['constraint'] = {
755757
'ast': None
756758
}
@@ -791,6 +793,7 @@ def getrecords(self):
791793
if 'startposition' not in self.parent.kvp or not self.parent.kvp['startposition']:
792794
self.parent.kvp['startposition'] = 1
793795

796+
print(self.parent.kvp['constraint'])
794797
# query repository
795798
LOGGER.debug('Querying repository with constraint: %s,\
796799
sortby: %s, typenames: %s, maxrecords: %s, startposition: %s',
@@ -799,7 +802,7 @@ def getrecords(self):
799802

800803
try:
801804
matched, results = self.parent.repository.query(
802-
ast=self.parent.kvp['constraint']['ast'],
805+
ast=self.parent.kvp['constraint'].get('ast'),
803806
sortby=self.parent.kvp['sortby'], typenames=self.parent.kvp['typenames'],
804807
maxrecords=self.parent.kvp['maxrecords'],
805808
startposition=int(self.parent.kvp['startposition'])-1)

pycsw/ogc/csw/csw3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ def getrecords(self):
844844

845845
try:
846846
matched, results = self.parent.repository.query(
847-
ast=self.parent.kvp['constraint']['ast'],
847+
ast=self.parent.kvp['constraint'].get('ast'),
848848
sortby=self.parent.kvp['sortby'], typenames=self.parent.kvp['typenames'],
849849
maxrecords=self.parent.kvp['maxrecords'],
850850
startposition=int(self.parent.kvp['startposition'])-1)

0 commit comments

Comments
 (0)