From 03dbdcfadfbc5ffed2cc75dbb14fcc04cb311f13 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Wed, 29 Jun 2016 17:19:24 +0200 Subject: [PATCH] [IMP] review --- database_cleanup/README.rst | 5 ----- database_cleanup/models/purge_tables.py | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/database_cleanup/README.rst b/database_cleanup/README.rst index 2b42dc2f4..73a65d297 100644 --- a/database_cleanup/README.rst +++ b/database_cleanup/README.rst @@ -33,11 +33,6 @@ For further information, please visit: * https://www.odoo.com/forum/help-1 -Known issues / Roadmap -====================== - -* ... - Bug Tracker =========== diff --git a/database_cleanup/models/purge_tables.py b/database_cleanup/models/purge_tables.py index 8eed85091..e8746c966 100644 --- a/database_cleanup/models/purge_tables.py +++ b/database_cleanup/models/purge_tables.py @@ -87,14 +87,11 @@ class CleanupPurgeWizardTable(models.TransientModel): # type m2m don't have _rel ] - # Cannot pass table names as a psycopg argument - known_tables_repr = ",".join( - [("'%s'" % table) for table in known_tables]) self.env.cr.execute( """ SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type = 'BASE TABLE' - AND table_name NOT IN (%s)""" % known_tables_repr) + AND table_name NOT IN %s""", (tuple(known_tables),)) res = [(0, 0, {'name': row[0]}) for row in self.env.cr.fetchall()] if not res: