diff --git a/backend/scripts/create_api_token.py b/backend/scripts/create_api_token.py index 98b602a9..91498482 100644 --- a/backend/scripts/create_api_token.py +++ b/backend/scripts/create_api_token.py @@ -7,6 +7,6 @@ parser = argparse.ArgumentParser() parser.add_argument("--name", required=True) args = parser.parse_args() - with SessionContextManager() as session: + with SessionContextManager(path="management_command:create_api_token") as session: token = create_api_token(session=session, name=args.name) print(f"Token created: {token.token}") diff --git a/backend/scripts/create_user.py b/backend/scripts/create_user.py index 1263b255..6ae3f7d7 100644 --- a/backend/scripts/create_user.py +++ b/backend/scripts/create_user.py @@ -9,7 +9,7 @@ parser.add_argument("--user", required=True) parser.add_argument("--pass", required=True) args = parser.parse_args() - with SessionContextManager(path="mangement_comment:create_user") as session: + with SessionContextManager(path="management_command:create_user") as session: try: user = create_user( session=session, username=args.user, password=getattr(args, "pass") diff --git a/backend/scripts/create_worker.py b/backend/scripts/create_worker.py index 536a6e5f..51c2a52d 100644 --- a/backend/scripts/create_worker.py +++ b/backend/scripts/create_worker.py @@ -13,7 +13,7 @@ if args.token is None: args.token = utils.get_random_string() - with SessionContextManager(path="mangement_comment:create_worker") as session: + with SessionContextManager(path="management_command:create_worker") as session: statement = select(Worker).where(Worker.token == args.token) results = session.exec(statement) existing_worker = results.one_or_none() diff --git a/backend/scripts/reset_task.py b/backend/scripts/reset_task.py index aa9b8f3f..08528eb8 100644 --- a/backend/scripts/reset_task.py +++ b/backend/scripts/reset_task.py @@ -12,7 +12,7 @@ "--uuid", required=True, type=uuid.UUID, help="Task UUID or Document UUID" ) args = parser.parse_args() - with SessionContextManager(path="mangement_comment:reset_task") as session: + with SessionContextManager(path="management_command:reset_task") as session: task = session.execute( update(Task) .where( diff --git a/backend/scripts/set_password.py b/backend/scripts/set_password.py index de63dd43..f661bb3a 100644 --- a/backend/scripts/set_password.py +++ b/backend/scripts/set_password.py @@ -10,7 +10,7 @@ parser.add_argument("--pass", required=True) args = parser.parse_args() - with SessionContextManager(path="mangement_comment:set_password") as session: + with SessionContextManager(path="management_command:set_password") as session: try: user = change_user_password( session=session, username=args.user, new_password=getattr(args, "pass")