Skip to content

Commit d7fdaa9

Browse files
committed
fix: uncomment service logic
1 parent a553e60 commit d7fdaa9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/modules/google_/service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ async def add_user_to_file(file_slug: str, user_id: PydanticObjectId, gmail: str
305305
role = file.default_role
306306

307307
# if user is the owner of the file, we don't need to add him again
308-
# if str(file.author_id) == str(user_id):
309-
# logger.info(f"User {user_id} is the owner of the file {file_slug}, no need to add him again")
310-
# return file
308+
if str(file.author_id) == str(user_id):
309+
logger.info(f"User {user_id} is the owner of the file {file_slug}, no need to add him again")
310+
return file
311311
# if user already joined the file with the same gmail, we don't need to add him again
312312
if any(join.gmail == gmail and str(join.user_id) == str(user_id) for join in file.sso_joins):
313313
logger.info(f"User {user_id} already joined the file {file_slug} with the same gmail, no need to add him again")

0 commit comments

Comments
 (0)