diff options
| author | HDA (OpenERP) <hda@tinyerp.com> | 2010-02-01 13:59:39 +0530 |
|---|---|---|
| committer | HDA (OpenERP) <hda@tinyerp.com> | 2010-02-01 13:59:39 +0530 |
| commit | 93bd614c8e25553ae6fc7eef8eb52105c22a02e6 (patch) | |
| tree | a91657d0fbef7e2ad4c663172ce757955f20f23e /addons/base_module_quality | |
| parent | a31a105e3329f55c28a5d289f152091a1bf1cc31 (diff) | |
| parent | 59ea96657ad15d170f582a80b7bf1cd80ff896f3 (diff) | |
merged to remove sql injection
bzr revid: hda@tinyerp.com-20100201082939-fj0u5f0pvlgq7j3k
Diffstat (limited to 'addons/base_module_quality')
| -rw-r--r-- | addons/base_module_quality/speed_test/speed_test.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/base_module_quality/speed_test/speed_test.py b/addons/base_module_quality/speed_test/speed_test.py index 92b73a1cafa..ab50afe1293 100644 --- a/addons/base_module_quality/speed_test/speed_test.py +++ b/addons/base_module_quality/speed_test/speed_test.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # ############################################################################## @@ -45,8 +45,9 @@ This test checks the speed of the module. Note that at least 5 demo data is need # remove osv_memory class becaz it does not have demo data if obj_list: - cr.execute("select w.res_model from ir_actions_todo as t left join ir_act_window as w on t.action_id=w.id where w.res_model in ('%s')"% ("','".join(obj_list))) + cr.execute("select w.res_model from ir_actions_todo as t left join ir_act_window as w on t.action_id=w.id where w.res_model =ANY(%s)",(obj_list,)) res = cr.fetchall() + print res for remove_obj in res: if remove_obj and (remove_obj[0] in obj_list): obj_list.remove(remove_obj[0]) |
