Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- recent_oa = db_session.query(exists().where(
- and_(
- and_(Jobs.candidate_id == candidate_id, Jobs.interview_type == 'EVALUATION', Jobs.disposition_date < datetime.now()-timedelta(days=1)),
- ## I want this to evaluate to be True
- and_(~Jobs.candidate_id == candidate_id, Jobs.interview_type == 'IN_HOUSE', Jobs.disposition_date > '2017-01-01'),
- ## and I want this to evaluate to False
- )
- )).scalar()
- recent_oa
- >> True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement