Skip to content

Commit

Permalink
fixup! Extract payment information to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
FestplattenSchnitzel committed Oct 20, 2023
1 parent 8e45c85 commit 174f03d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sipa/model/pycroft/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def finance_information(self) -> FinanceInformation:
def payment_details(self) -> PaymentDetails:
return PaymentDetails(
recipient=current_app.config["PAYMENT_BENEFICIARY"],
iban=IBAN(current_app.config["PAYMENT_IBAN"]),
iban=IBAN(current_app.config["PAYMENT_IBAN"], validate_bban=True),
purpose="{id}, {name}, {address}".format(
id=self.user_data.user_id,
name=self.user_data.name,
Expand Down
3 changes: 2 additions & 1 deletion sipa/model/sample/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from flask import current_app
from flask_login import AnonymousUserMixin
from schwifty import IBAN
from werkzeug.local import LocalProxy

from sipa.model.exceptions import PasswordInvalid, UserNotFound
Expand Down Expand Up @@ -232,7 +233,7 @@ def birthdate(self):
def payment_details(self) -> PaymentDetails:
return PaymentDetails(
recipient="Donald Duck",
iban="EH12432543209523",
iban=IBAN("EH12432543209523", allow_invalid=True),
purpose=self.id.value,
)

Expand Down

0 comments on commit 174f03d

Please sign in to comment.