diff --git a/src/backend/app/organisations/organisation_crud.py b/src/backend/app/organisations/organisation_crud.py index c0cebcb885..5af2de74ff 100644 --- a/src/backend/app/organisations/organisation_crud.py +++ b/src/backend/app/organisations/organisation_crud.py @@ -196,14 +196,14 @@ async def delete_organisation( async def add_organisation_admin( - db: Session, user_id: int, organization: db_models.DbOrganisation + db: Session, user_id: int, organisation: db_models.DbOrganisation ): """Adds a user as an admin to the specified organisation. Args: db (Session): The database session. user_id (int): The ID of the user to be added as an admin. - organization (DbOrganisation): The organisation model instance. + organisation (DbOrganisation): The organisation model instance. Returns: Response: The HTTP response with status code 200. @@ -212,7 +212,7 @@ async def add_organisation_admin( user_model_instance = await user_crud.get_user(db, user_id) # add data to the managers field in organisation model - organization.managers.append(user_model_instance) + organisation.managers.append(user_model_instance) db.commit() return Response(status_code=HTTPStatus.OK) diff --git a/src/backend/app/organisations/organisation_routes.py b/src/backend/app/organisations/organisation_routes.py index 220a6cb3e8..272091af11 100644 --- a/src/backend/app/organisations/organisation_routes.py +++ b/src/backend/app/organisations/organisation_routes.py @@ -121,4 +121,4 @@ async def add_new_organisation_admin( # check if the current_user is the organisation admin org_admin(db, organisation.id, current_user) - return await organisation_crud.add_organisation_admin(db, user, organization) + return await organisation_crud.add_organisation_admin(db, user, organisation)