Skip to content

Commit

Permalink
Fix list query
Browse files Browse the repository at this point in the history
  • Loading branch information
shri committed Aug 30, 2024
1 parent 1b7217c commit 11ae3d6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/app/domain/jobs/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
if TYPE_CHECKING:
from advanced_alchemy.filters import FilterTypes

__all__ = (
"JobPostRepository",
)
__all__ = ("JobPostRepository",)


class JobPostRepository(SQLAlchemyAsyncRepository[JobPost]):
Expand All @@ -33,11 +31,7 @@ async def get_job_posts(

return await self.list_and_count(
*filters,
statement=select(JobPost)
.order_by(JobPost.created_at)
.options(
joinedload(JobPost.company, isouter=True),
),
statement=select(JobPost).order_by(JobPost.created_at).options(),
auto_expunge=auto_expunge,
force_basic_query_mode=force_basic_query_mode,
**kwargs,
Expand Down

0 comments on commit 11ae3d6

Please sign in to comment.