changeset 54b8e79f4588 in modules/account_payment_sepa:default
details: 
https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset;node=54b8e79f4588
description:
        Use direct access to backend classes

        issue8836
        review258421002
diffstat:

 account.py |  3 +--
 payment.py |  3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 503a85a589b7 -r 54b8e79f4588 account.py
--- a/account.py        Wed Dec 04 11:09:35 2019 +0100
+++ b/account.py        Fri Dec 06 17:33:46 2019 +0100
@@ -34,8 +34,7 @@
 
     @classmethod
     def __register__(cls, module_name):
-        TableHandler = backend.get('TableHandler')
-        exist = TableHandler.table_exist(cls._table)
+        exist = backend.TableHandler.table_exist(cls._table)
 
         super(ConfigurationSepaMandateSequence, cls).__register__(module_name)
 
diff -r 503a85a589b7 -r 54b8e79f4588 payment.py
--- a/payment.py        Wed Dec 04 11:09:35 2019 +0100
+++ b/payment.py        Fri Dec 06 17:33:46 2019 +0100
@@ -699,7 +699,6 @@
 
     @classmethod
     def __register__(cls, module_name):
-        TableHandler = backend.get('TableHandler')
         cursor = Transaction().connection.cursor()
         pool = Pool()
         Group = pool.get('account.payment.group')
@@ -707,7 +706,7 @@
         super(Message, cls).__register__(module_name)
 
         # Migration from 3.2
-        if TableHandler.table_exist(Group._table):
+        if backend.TableHandler.table_exist(Group._table):
             group_table = Group.__table_handler__(module_name)
             if group_table.column_exist('sepa_message'):
                 group = Group.__table__()

Reply via email to