Update random objects getter

This commit is contained in:
2022-01-01 12:37:22 +03:00
parent a58136c5c2
commit 4a78d4f987
7 changed files with 49 additions and 15 deletions

View File

@@ -1,6 +1,6 @@
from app.models import Sequence
from app.services.common import TRGMSearchService
from app.services.common import TRGMSearchService, GetRandomService
GET_OBJECT_IDS_QUERY = """
@@ -33,3 +33,7 @@ class SequenceTGRMSearchService(TRGMSearchService):
MODEL_CLASS = Sequence
PREFETCH_RELATED = ["source"]
GET_OBJECT_IDS_QUERY = GET_OBJECT_IDS_QUERY
class GetRandomSequenceService(GetRandomService):
MODEL_CLASS = Sequence