Skip to content

Commit 3b847e9

Browse files
hugho-admoylop260
authored andcommitted
[FIX] Bad convertion of parammeters in sql execution (#1248)
1 parent 841c258 commit 3b847e9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

user_story/model/timesheet.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ def _get_analytic_from_task(self, cr, uid, ids, context=None):
6666
SELECT array_agg(work.hr_analytic_timesheet_id) as a_id
6767
FROM project_task AS task
6868
INNER JOIN project_task_work AS work ON work.task_id=task.id
69-
WHERE task.id %(op)s %(tids)s
70-
''', {'op': (len(ids) == 1) and '=' or 'in',
71-
'tids': (len(ids) == 1) and ids[0] or tuple(ids)})
69+
WHERE task.id in %s''', (tuple(ids),))
7270
res = cr.dictfetchall()
7371
if res:
7472
res = res[0].get('a_id', []) or []

0 commit comments

Comments
 (0)