mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
Fix typos
This commit is contained in:
parent
05ed82ac9f
commit
22954a1adb
2 changed files with 6 additions and 6 deletions
|
@ -305,7 +305,7 @@ def importFromFile(filePath):
|
|||
dest = relative_db_bk_dir / f"before_{dbSemester}_import_{now()}.db"
|
||||
copy2(relative_db_path, dest)
|
||||
|
||||
show(f"Made a backup of the database before commiting the import at {dest}")
|
||||
show(f"Made a backup of the database before committing the import at {dest}")
|
||||
|
||||
db.session.commit()
|
||||
except Exception as ex:
|
||||
|
|
|
@ -8,7 +8,7 @@ from ..terminal_utils import box, spaced_hl, validating_input
|
|||
|
||||
|
||||
def main():
|
||||
print("This script will generate a new random password for a choosen admin.")
|
||||
print("This script will generate a new random password for a chosen admin.")
|
||||
print()
|
||||
|
||||
with app.app_context():
|
||||
|
@ -17,7 +17,7 @@ def main():
|
|||
activate_user = False
|
||||
|
||||
if len(admins) == 0:
|
||||
print("There is no admin with an active user. The user of the choosen admin will be activated")
|
||||
print("There is no admin with an active user. The user of the chosen admin will be activated")
|
||||
admins = db.session.execute(select(Admin)).scalars().all()
|
||||
activate_user = True
|
||||
|
||||
|
@ -35,16 +35,16 @@ def main():
|
|||
format_function=lambda ans: int(ans),
|
||||
)
|
||||
|
||||
choosen_admin_user = admins[admin_index].user
|
||||
chosen_admin_user = admins[admin_index].user
|
||||
|
||||
new_password = randomPassword()
|
||||
|
||||
admin_change_password(
|
||||
choosen_admin_user, new_password, notify=False
|
||||
chosen_admin_user, new_password, notify=False
|
||||
) # Password is automatically hashed with this function
|
||||
|
||||
if activate_user:
|
||||
choosen_admin_user.active = True
|
||||
chosen_admin_user.active = True
|
||||
|
||||
box(new_password, "New password")
|
||||
|
||||
|
|
Loading…
Reference in a new issue