Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 792c807

Browse files
committed
🧪 Fix tests
1 parent ec2ac39 commit 792c807

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

‎platform/reworkd_platform/web/api/agent/tools/sidsearch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async def dynamic_available(user: UserBase, oauth_crud: OAuthCrud) -> bool:
7575
user_id=user.id, provider="sid"
7676
)
7777

78-
return installation and installation.access_token_enc
78+
return bool(installation and installation.access_token_enc)
7979

8080
async def call(
8181
self,

‎platform/reworkd_platform/web/api/auth/views.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from slack_sdk import WebClient
88
from slack_sdk.errors import SlackApiError
99

10-
from reworkd_platform.db.crud.organization import OrganizationCrud, OrganizationUsers
1110
from reworkd_platform.db.crud.oauth import OAuthCrud
11+
from reworkd_platform.db.crud.organization import OrganizationCrud, OrganizationUsers
1212
from reworkd_platform.schemas import UserBase
1313
from reworkd_platform.schemas.user import OrganizationRole
1414
from reworkd_platform.services.oauth_installers import (
@@ -103,9 +103,8 @@ async def sid_info(
103103
crud: OAuthCrud = Depends(OAuthCrud.inject),
104104
) -> Dict[str, Any]:
105105
creds = await crud.get_installation_by_user_id(user.id, "sid")
106-
connected = creds and creds.access_token_enc
107106
return {
108-
"connected": connected,
107+
"connected": bool(creds and creds.access_token_enc),
109108
}
110109

111110

0 commit comments

Comments
 (0)