changeset 8f038bb88d5a in modules/party:6.0
details: https://hg.tryton.org/modules/party?cmd=changeset&node=8f038bb88d5a
description:
        Convert identifier types into list to append to other list

        issue10420
        review359621002
        (grafted from 929a0e7d90aee9223a84b22470d1444f3c43b10f)
diffstat:

 configuration.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r b45c0445abb1 -r 8f038bb88d5a configuration.py
--- a/configuration.py  Mon May 03 15:38:28 2021 +0200
+++ b/configuration.py  Thu May 20 10:16:23 2021 +0200
@@ -73,8 +73,9 @@
         pool = Pool()
         Identifier = pool.get('party.identifier')
         if self.identifier_types:
+            identifier_types = [None, ''] + list(self.identifier_types)
             identifiers = Identifier.search([
-                    ('type', 'not in', [None, ''] + self.identifier_types),
+                    ('type', 'not in', identifier_types),
                     ], limit=1, order=[])
             if identifiers:
                 identifier, = identifiers

Reply via email to