From 70a3ff61c8ec7486e3528b6950fb2bc16e8c1cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 3 Dec 2008 17:30:12 +0100 Subject: [PATCH] Fix query to fetch constrains definitions --- trytond/sql_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/sql_db.py b/trytond/sql_db.py index 8e557f1584..c21fdd7c86 100644 --- a/trytond/sql_db.py +++ b/trytond/sql_db.py @@ -269,7 +269,7 @@ class table_handler: "LEFT JOIN pg_class cl on (co.conrelid = cl.oid) "\ "LEFT JOIN pg_class cl2 on (co.confrelid = cl2.oid) "\ "LEFT JOIN pg_attribute at on (co.conkey[1] = at.attnum) "\ - "WHERE cl.relname = %s", + "WHERE cl.relname = %s AND at.attrelid = cl.oid", (self.table_name,)) self.constraint = [] self.fk_deltype = {}