Skip to content

Commit

Permalink
Correct to_attr example
Browse files Browse the repository at this point in the history
  • Loading branch information
j4mie committed Jun 10, 2024
1 parent 7f3c778 commit ecb27d1
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions docs/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
]
```

Expand Down

0 comments on commit ecb27d1

Please sign in to comment.