Skip to content

Commit e90b56f

Browse files
committed
Fix join
1 parent dfa4929 commit e90b56f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cg/store/crud/read.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -675,20 +675,18 @@ def get_collaborator_samples(self, request: CollaboratorSamplesRequest) -> list[
675675
SampleFilter.BY_INTERNAL_ID_OR_NAME_SEARCH,
676676
SampleFilter.ORDER_BY_CREATED_AT_DESC,
677677
SampleFilter.IS_NOT_CANCELLED,
678-
SampleFilter.LIMIT,
679678
]
680679
samples: Query = apply_sample_filter(
681680
samples=self._get_query(table=Sample),
682681
customer_entry_ids=collaborator_ids,
683682
search_pattern=request.enquiry,
684683
filter_functions=filters,
685-
limit=request.limit,
686684
)
687685
if request.order_type:
688-
samples.join(Application).filter(
686+
samples.join(ApplicationVersion).join(Application).filter(
689687
Application.order_type_applications.contains(request.order_type)
690688
)
691-
return samples.all()
689+
return samples.limit(request.limit).all()
692690

693691
def _get_samples_by_customer_and_subject_id_query(
694692
self, customer_internal_id: str, subject_id: str

0 commit comments

Comments
 (0)