Skip to content

Commit

Permalink
refactor: fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jan 22, 2024
1 parent 12acd85 commit 8bb9efb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/backend/app/organisations/organisation_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/backend/app/organisations/organisation_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 8bb9efb

Please sign in to comment.