From 39cfa7fee518edb9486d6b32110ec5ae0a10f20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 21 Mar 2017 10:43:33 +0100 Subject: [PATCH] Use static selection for identifier type issue6374 review34781002 --- party.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/party.py b/party.py index cf81d0b2c2..e968bbe7cd 100644 --- a/party.py +++ b/party.py @@ -59,6 +59,7 @@ class PartyIdentifier: @classmethod def __setup__(cls): super(PartyIdentifier, cls).__setup__() + cls.type.selection.append(('sepa', 'SEPA Creditor Identifier')) cls._error_messages.update({ 'unique_sepa': ('Party "%(party)s" has more than one ' 'SEPA Creditor Identifier.'), @@ -66,12 +67,6 @@ class PartyIdentifier: '"%(party)s" is not valid.'), }) - @classmethod - def get_types(cls): - return super(PartyIdentifier, cls).get_types() + [ - ('sepa', 'SEPA Creditor Identifier'), - ] - def check_code(self): super(PartyIdentifier, self).check_code() if self.type == 'sepa':