Skip to content

Commit

Permalink
fix test/lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NatSquared committed Jul 31, 2024
1 parent b6fa784 commit fb93232
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions met-api/src/met_api/resources/staff_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
from flask_cors import cross_origin
from flask_restx import Namespace, Resource

from met_api.auth import jwt as _jwt, auth
from met_api.auth import auth
from met_api.auth import jwt as _jwt
from met_api.exceptions.business_exception import BusinessException
from met_api.models.pagination_options import PaginationOptions
from met_api.schemas.engagement import EngagementSchema
Expand Down Expand Up @@ -183,6 +184,7 @@ def get(user_id):
except BusinessException as err:
return {'message': err.error}, err.status_code


@cors_preflight('GET,OPTIONS')
@API.route('/<user_id>/tenants')
class UserTenants(Resource):
Expand All @@ -196,7 +198,7 @@ def get(user_id):
if user_id == 'me':
user_data = TokenInfo.get_user_data()
user_id = user_data.get('external_id')
print("User ID: ", user_id)
print('User ID: ', user_id)
user_roles = current_app.config['JWT_ROLE_CALLBACK'](g.jwt_oidc_token_info)
if Role.SUPER_ADMIN.value in user_roles:
return TenantService.get_all(), HTTPStatus.OK
Expand Down
2 changes: 1 addition & 1 deletion met-web/src/components/layout/Header/InternalHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ const UserMenu = () => {
const UserButtonContent = ({ isOpen }: { isOpen: boolean }) => {
const currentUser = useAppSelector((state) => state.user.userDetail.user);
return (
<Grid container direction="row" alignItems="center" spacing={1}>
<Grid container data-testid="user-menu-button" direction="row" alignItems="center" spacing={1}>
<Grid item>
<Avatar
sx={{
Expand Down

0 comments on commit fb93232

Please sign in to comment.