Skip to content

Commit 2eae041

Browse files
committed
update
1 parent 40cf9f1 commit 2eae041

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pycsw/core/repository.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ 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-
if self.database is not None:
465+
try:
466466
sortby_column = getattr(self.dataset, sortby['propertyname'])
467-
else:
467+
except:
468468
sortby_column = self.query_mappings.get(sortby['propertyname'])
469469

470470
if sortby['order'] == 'DESC': # descending sort

0 commit comments

Comments
 (0)