Skip to content

Commit

Permalink
Undefer jobpost body
Browse files Browse the repository at this point in the history
  • Loading branch information
shrir committed Nov 8, 2024
1 parent 15d2ee8 commit 5d95a60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/domain/opportunities/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import TYPE_CHECKING, Any

from sqlalchemy import ColumnElement, insert, select, or_, and_, not_, func, text
from sqlalchemy.orm import InstrumentedAttribute, selectinload
from sqlalchemy.orm import InstrumentedAttribute, selectinload, undefer
from advanced_alchemy.filters import SearchFilter, LimitOffset
from advanced_alchemy.exceptions import RepositoryError
from advanced_alchemy.service import SQLAlchemyAsyncRepositoryService, is_dict, is_msgspec_model, is_pydantic_model
Expand Down Expand Up @@ -210,7 +210,7 @@ async def scan(
)
)
.execution_options(populate_existing=True)
.options(selectinload(JobPost.company))
.options(selectinload(JobPost.company), undefer(JobPost.body))
)

job_post_results = await self.repository.session.execute(statement=job_posts_statement)
Expand Down

0 comments on commit 5d95a60

Please sign in to comment.