diff --git a/advlabdb/database_import.py b/advlabdb/database_import.py index 7288a36..d6de169 100644 --- a/advlabdb/database_import.py +++ b/advlabdb/database_import.py @@ -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: diff --git a/advlabdb/scripts/maintain/reset_admin_password.py b/advlabdb/scripts/maintain/reset_admin_password.py index 9d56368..e02dd57 100644 --- a/advlabdb/scripts/maintain/reset_admin_password.py +++ b/advlabdb/scripts/maintain/reset_admin_password.py @@ -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")