From 60cb4c7d9916da64534728a81aa0fe31967901ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Thu, 3 Mar 2016 21:55:13 +0100 Subject: [PATCH] Follow PEP-0249 for Transaction and backends issue4949 review19781002 --- work.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/work.py b/work.py index 129b5aa088..49bd33316b 100644 --- a/work.py +++ b/work.py @@ -126,9 +126,9 @@ class Work(ModelSQL, ModelView): def __register__(cls, module_name): TimesheetWork = Pool().get('timesheet.work') TableHandler = backend.get('TableHandler') - cursor = Transaction().cursor - table_project_work = TableHandler(cursor, cls, module_name) - table_timesheet_work = TableHandler(cursor, TimesheetWork, module_name) + cursor = Transaction().connection.cursor() + table_project_work = TableHandler(cls, module_name) + table_timesheet_work = TableHandler(TimesheetWork, module_name) project = cls.__table__() timesheet = TimesheetWork.__table__() @@ -311,7 +311,7 @@ class Work(ModelSQL, ModelView): @classmethod def get_total(cls, works, names): - cursor = Transaction().cursor + cursor = Transaction().connection.cursor() table = cls.__table__() works = cls.search([