Skip to content

Commit

Permalink
Error in docs. Spent time, found right solution in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
belonesox committed May 30, 2021
1 parent 90abc6d commit 14c337b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -130,7 +130,7 @@ Here's a simple example of models and prefetch setup::
decorator = lambda author, books=(): setattr(
author,
'latest_book',
max(books, key=lambda book: book.created)
max(books, key=lambda book: book.created) if books else None
)
)
)
Expand Down

0 comments on commit 14c337b

Please sign in to comment.