Skip to content

Commit e3b577e

Browse files
committed
update
1 parent 3e7aff3 commit e3b577e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pycsw/core/repository.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,10 @@ def query(self, constraint=None, sortby=None, typenames=None,
462462
if sortby is not None: # apply sorting
463463
LOGGER.debug('sorting detected')
464464
# TODO: Check here for dbtype so to extract wkt from postgis native to wkt
465-
sortby_column = self.query_mappings.get(sortby['propertyname'])
465+
if self.database is not None:
466+
sortby_column = getattr(self.dataset, sortby['propertyname'])
467+
else:
468+
sortby_column = self.query_mappings.get(sortby['propertyname'])
466469

467470
if sortby['order'] == 'DESC': # descending sort
468471
if 'spatial' in sortby and sortby['spatial']: # spatial sort

0 commit comments

Comments
 (0)