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 Jan 4, 2024
1 parent e9cf171 commit ba93873
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=f"{self.user_data.user_id}, {self.user_data.name}, {self.user_data.room}",
)

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 ba93873

Please sign in to comment.