Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
avgupta456 committed Nov 30, 2024
1 parent 5b10c99 commit eeb0f55
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/src/processing/wrapped/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ async def query_wrapped_user(
) -> Tuple[bool, Optional[WrappedPackage]]:
start_date, end_date = date(year, 1, 1), date(year, 12, 31)
user: Optional[PublicUserModel] = await db_get_public_user(user_id)
access_token = None if user is None else user.access_token
private_access = False if user is None else user.private_access or False
private_access = False
access_token = None
if user is not None and user.private_access:
private_access = True
access_token = user.access_token
user_package: UserPackage = await query_user(
user_id,
access_token,
Expand Down

0 comments on commit eeb0f55

Please sign in to comment.