added iban validity to member model

pull/104/head
mariusrklein 12 months ago
parent 847638b2b7
commit 9394d5e6af

@ -29,6 +29,7 @@ from contrib.rules import memberize_user, has_global_perm
from utils import cvt_to_decimal
from dateutil.relativedelta import relativedelta
from schwifty import IBAN
def generate_random_key():
return uuid.uuid4().hex
@ -340,6 +341,10 @@ class Member(Person):
"""Returning the whole place (plz + town)"""
return "{0} {1}".format(self.plz, self.town)
@property
def iban_valid(self):
return IBAN(self.iban, allow_invalid=True).is_valid
@property
def address(self):
"""Returning the whole address"""

Loading…
Cancel
Save