1
0
Fork 0
mirror of https://github.com/dancojocaru2000/foxbank.git synced 2025-02-22 23:39:36 +02:00

Fixed IBAN generation

This commit is contained in:
Kenneth Bruen 2021-12-30 00:55:37 +02:00
parent 02cf164620
commit 18fe6e9355
Signed by: kbruen
GPG key ID: C1980A470C3EE5B1
2 changed files with 2 additions and 3 deletions

View file

@ -26,8 +26,7 @@ def create_app():
def init_cors(app): def init_cors(app):
from flask_cors import CORS from flask_cors import CORS
cors = CORS() cors = CORS(app)
cors.init_app(app)
def init_db(app): def init_db(app):
from .db import init_app from .db import init_app

View file

@ -132,7 +132,7 @@ class Module(ModuleType):
from random import randint from random import randint
while True: while True:
iban = 'RO00FOXB0' + account.currency iban = 'RO00FOXB0' + account.currency
iban += str(randint(0, 10 ** 13)).rjust(12, '0') iban += str(randint(10, 10 ** 12 - 1)).rjust(12, '0')
from .utils.iban import gen_check_digits from .utils.iban import gen_check_digits
iban = gen_check_digits(iban) iban = gen_check_digits(iban)
if iban not in ibans: if iban not in ibans: