mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Update random objects getter
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from app.models import Author
|
||||
|
||||
from app.services.common import TRGMSearchService
|
||||
from app.services.common import TRGMSearchService, GetRandomService
|
||||
|
||||
|
||||
GET_OBJECT_IDS_QUERY = """
|
||||
@@ -41,3 +41,7 @@ class AuthorTGRMSearchService(TRGMSearchService):
|
||||
MODEL_CLASS = Author
|
||||
PREFETCH_RELATED = ["source", "annotations"]
|
||||
GET_OBJECT_IDS_QUERY = GET_OBJECT_IDS_QUERY
|
||||
|
||||
|
||||
class GetRandomAuthorService(GetRandomService):
|
||||
MODEL_CLASS = Author
|
||||
|
||||
Reference in New Issue
Block a user