From 023d02c7bfc39e9694b0e8d36e38d51ed20b60e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Tue, 15 May 2012 10:31:09 +0200 Subject: [PATCH] Do not compute twice the children timesheets review355001 (transplanted from 973bf618edb04399e9c86ba07054b455c7adb79f) --- work.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work.py b/work.py index c29693ff5e..3e47748dd4 100644 --- a/work.py +++ b/work.py @@ -76,7 +76,7 @@ class Work(ModelSQL, ModelView): ('parent', 'child_of', ids) ], context=context) # force inactive ids to be in all_ids - all_ids = all_ids + ids + all_ids = list(set(all_ids + ids)) clause = "SELECT work, sum(hours) FROM timesheet_line "\ "WHERE work IN (%s) "\ % ",".join(('%s',) * len(all_ids))