From 8fa0e12796c5ba0e13e62fb917fff61d630f4c0b Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Sun, 30 Sep 2012 21:05:26 +0100 Subject: [PATCH] Safer datastore_active flagging --- ckanext/datastore/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/datastore/plugin.py b/ckanext/datastore/plugin.py index e4a30f82445..2abd00f73bc 100644 --- a/ckanext/datastore/plugin.py +++ b/ckanext/datastore/plugin.py @@ -75,7 +75,7 @@ def new_resource_show(context, data_dict): try: connection = engine.connect() result = connection.execute( - 'SELECT 1 FROM pg_tables WHERE tablename = %s', + 'SELECT 1 FROM "_table_metadata" WHERE name = %s AND alias_of IS NULL', new_data_dict['id'] ).fetchone() if result: