From 50d4e7c40f704de18dab9ac8c0b7591b68343e34 Mon Sep 17 00:00:00 2001 From: Martin Dobias Date: Tue, 17 Nov 2015 11:05:32 +0100 Subject: [PATCH] Fix bug hardcoded geometry column name (fixes #1) --- Discovery/dbutils.py | 4 ++-- Discovery/metadata.txt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Discovery/dbutils.py b/Discovery/dbutils.py index 697815a..fbf0289 100644 --- a/Discovery/dbutils.py +++ b/Discovery/dbutils.py @@ -126,8 +126,8 @@ def get_search_sql(search_text, geom_column, search_column, display_columns, ext query_text = """ SELECT ST_AsText("%s") AS geom, - ST_SRID(geom) AS epsg, - """ % geom_column + ST_SRID("%s") AS epsg, + """ % (geom_column, geom_column) query_text += """"%s" """ % search_column if len(display_columns) > 0: diff --git a/Discovery/metadata.txt b/Discovery/metadata.txt index 4b1b0cc..aedfec3 100644 --- a/Discovery/metadata.txt +++ b/Discovery/metadata.txt @@ -2,7 +2,7 @@ name=Discovery qgisMinimumVersion=2.0 description=Provides search / gazetteer functionality in QGIS using PostGIS-based data -version=1.0 +version=1.0.1 author=Lutra Consulting email=info@lutraconsulting.co.uk homepage=http://www.lutraconsulting.co.uk/products/discovery/ @@ -16,6 +16,7 @@ about=The Discovery plugin adds search capability to QGIS. Its key features are: - Can use multiple fields to display result context - Simple GUI-based configuration -changelog=1.0 - Initial release +changelog=1.0.1 - Fixed error with hardcoded geometry column (#1) +

1.0 - Initial release tags=PostGIS, search, gazetteer