Это старая версия документа!


Python - Документация

(VotingAchievement.uuid == nomination_id) if nomination_id else True
~ VotingAchievement.uuid
nominations = await self._session.execute(
            select(VotingAchievement).where(
                ~VotingAchievement.is_deleted,
                VotingAchievement.is_published,
                (VotingAchievement.uuid == nomination_id) if nomination_id else True,
            ).order_by(VotingAchievement.position).options(
                selectinload(VotingAchievement.icon), selectinload(VotingAchievement.preview)
            )
        )
 
for nomination in nominations.scalars().all():
  ...