Comment 4 for bug 1288719

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Daniel,

In your original bug report, the query was:

            cr.execute("select * from ir_module_module where name=%s and state=%s" %
                                                            ('product_m2mcategories', 'installed'))

Indeed, this code is wrong and would produce

select * from ir_module_module where name=product_m2mcategories and state=installed

However, the current code is

cr.execute('select * from ir_module_module where name=%s and state=%s', ('product_m2mcategories','installed'))

Which is correct. Using params is useless as the values are static, but the query is still valid. See http://initd.org/psycopg/docs/usage.html

Thanks