Add annotation_exists field to Book and Author

This commit is contained in:
2021-12-05 19:14:05 +03:00
parent aacdf51f17
commit 5fbe26c0f2
7 changed files with 23 additions and 12 deletions

View File

@@ -10,4 +10,4 @@ class AuthorTGRMSearchService(TRGMSearchService):
Author.Meta.table.c.first_name,
Author.Meta.table.c.middle_name
]
PREFETCH_RELATED = ["source"]
PREFETCH_RELATED = ["source", "annotations"]

View File

@@ -13,7 +13,7 @@ class BookTGRMSearchService(TRGMSearchService):
FIELDS = [
BookDB.Meta.table.c.title
]
PREFETCH_RELATED = ["source", "authors"]
PREFETCH_RELATED = ["source", "authors", "annotations"]
FILTERS = [
BookDB.Meta.table.c.is_deleted == False,
]