Skip to content

Commit aacb9da

Browse files
committed
address type issue caught by mypy in waiting list
1 parent e78e951 commit aacb9da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openlibrary/core/lending.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ def get_loans_of_user(user_key: str) -> list[Loan]:
675675
loans += _get_ia_loans_of_user(account.itemname)
676676
# Set patron's loans in cache w/ now timestamp
677677
get_cached_loans_of_user.memcache_set(
678-
[user_key], {}, loans or [], time.time()
678+
(user_key,), {}, loans or [], time.time()
679679
) # rehydrate cache
680680
return loans
681681

@@ -702,7 +702,7 @@ def get_user_waiting_loans(user_key: str) -> list[WaitingLoan]:
702702
itemname = account.itemname if account else None
703703
result = WaitingLoan.query(userid=itemname)
704704
get_cached_user_waiting_loans.memcache_set(
705-
[user_key], {}, result or {}, time.time()
705+
(user_key,), {}, result or [], time.time()
706706
) # rehydrate cache
707707
return result or []
708708
except JSONDecodeError:

0 commit comments

Comments
 (0)