From ecb27d1d142728ab2400128d9dd38e93937729ba Mon Sep 17 00:00:00 2001 From: Jamie Matthews Date: Mon, 10 Jun 2024 11:51:21 +0100 Subject: [PATCH] Correct to_attr example --- docs/cookbook.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/docs/cookbook.md b/docs/cookbook.md index 50b2b1d..067a901 100644 --- a/docs/cookbook.md +++ b/docs/cookbook.md @@ -122,17 +122,15 @@ from django_readers import specs spec = [ "name", - { - "books_2022": specs.relationship( - "book_set", - [ - pairs.filter(publication_date__year=2022), - "id", - "title", - ], - to_attr="books_2022", - ) - }, + specs.relationship( + "book_set", + [ + pairs.filter(publication_date__year=2022), + "id", + "title", + ], + to_attr="books_2022", + ) ] ```