diff --git a/openlibrary/plugins/upstream/mybooks.py b/openlibrary/plugins/upstream/mybooks.py index 821cd7b38f7..b7961598a22 100644 --- a/openlibrary/plugins/upstream/mybooks.py +++ b/openlibrary/plugins/upstream/mybooks.py @@ -61,7 +61,7 @@ def render_template(self, mb): if mb.me: myloans = get_loans_of_user(mb.me.key) - loans = web.Storage({"docs": [], "total_results": len(loans)}) + loans = web.Storage({"docs": [], "total_results": len(myloans)}) # TODO: should do in one web.ctx.get_many fetch for loan in myloans: # Book will be None if no OL edition exists for the book