Skip to content

Commit

Permalink
fix geometry column detection regression error
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis authored and kalxas committed Oct 17, 2023
1 parent c7ddb20 commit 7fd98f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pycsw/core/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ def __init__(self, database, context, app_root=None, table='records', repo_filte
'instrument': self.dataset.instrument,
'sensortype': self.dataset.sensortype
}
if self.dbtype == 'postgresql+postgis+native':
self.query_mappings['bbox'] = self.dataset.wkb_geometry

if self.dbtype == 'postgresql':
# check if PostgreSQL is enabled with PostGIS 1.x
Expand Down Expand Up @@ -209,6 +207,10 @@ def __init__(self, database, context, app_root=None, table='records', repo_filte
LOGGER.debug('%s support detected', temp_dbtype)
self.dbtype = temp_dbtype

if self.dbtype == 'postgresql+postgis+native':
LOGGER.debug('Adjusting to PostGIS geometry column (wkb_geometry)')
self.query_mappings['bbox'] = self.dataset.wkb_geometry

if self.dbtype in ['sqlite', 'sqlite3']: # load SQLite query bindings
# <= 0.6 behaviour
if not __version__ >= '0.7':
Expand Down

0 comments on commit 7fd98f3

Please sign in to comment.