From c1c2f9faa435cbe59238035352881ee7e7e10e5e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 4 Jul 2024 15:55:04 -0700 Subject: [PATCH] fix backend invite link sign up --- litellm/proxy/proxy_server.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index ad6c83b6f14..f388db4a712 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -7704,22 +7704,12 @@ async def claim_onboarding_link(data: InvitationClaim): ) #### CHECK IF CLAIMED - ##### if claimed - check if within valid session (within 10 minutes of being claimed) + ##### if claimed - accept ##### if unclaimed - reject - current_time = litellm.utils.get_utc_datetime() - - if invite_obj.is_accepted == True: - time_difference = current_time - invite_obj.updated_at - - # Check if the difference is within 10 minutes - if time_difference > timedelta(minutes=10): - raise HTTPException( - status_code=401, - detail={ - "error": "The invitation link has already been claimed. Please ask your admin for a new invite link." - }, - ) + if invite_obj.is_accepted is True: + # this is a valid invite that was accepted + pass else: raise HTTPException( status_code=401,