Skip to content

Commit

Permalink
fixup! Enable submission of repayment requests
Browse files Browse the repository at this point in the history
  • Loading branch information
FestplattenSchnitzel committed Jan 21, 2024
1 parent 163e05e commit 9f8351f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pycroft/lib/finance/repayment/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class IBANField(fields.Field):

def _deserialize(self, value, attr, data, **kwargs) -> IBAN:
try:
return IBAN(value)
return IBAN(value, validate_bban=True)
except ValueError as error:
raise ValidationError("Pin codes must contain only digits.") from error
raise ValidationError("Field must be a valid IBAN.") from error
4 changes: 2 additions & 2 deletions web/api/v0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def patch(self, token: str, password: str) -> ResponseReturnValue:


class RequestRepaymentResource(Resource):
def get(self, user_id: int):
def get(self, user_id: int) -> Response:
current_app.logger.warning("RECEIVED GET FOR REQUEST_REPAYMENT.")
return jsonify(False)

Expand All @@ -812,7 +812,7 @@ def get(self, user_id: int):
},
location="form",
)
def post(self, user_id: int, beneficiary: str, iban: str, amount: Decimal):
def post(self, user_id: int, beneficiary: str, iban: str, amount: Decimal) -> Response:
current_app.logger.warning({beneficiary, iban, amount})
return jsonify({"success": True})

Expand Down

0 comments on commit 9f8351f

Please sign in to comment.