Skip to content

Commit

Permalink
Merge pull request feder-cr#706 from himankpathak/fix_get_base_url_da…
Browse files Browse the repository at this point in the history
…te_query

Hotfix - Fix get_base_search_url method to build valid date query
  • Loading branch information
surapuramakhil authored Nov 2, 2024
2 parents ef894a8 + d6e4529 commit 2f25118
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ai_hawk/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,10 @@ def get_base_search_url(self, parameters):
if job_types:
url_parts.append(f"f_JT={','.join(job_types)}")
date_mapping = {
"all time": "",
"all_time": "",
"month": "&f_TPR=r2592000",
"week": "&f_TPR=r604800",
"24 hours": "&f_TPR=r86400"
"24_hours": "&f_TPR=r86400"
}
date_param = next((v for k, v in date_mapping.items() if parameters.get('date', {}).get(k)), "")
url_parts.append("f_LF=f_AL") # Easy Apply
Expand Down
2 changes: 1 addition & 1 deletion tests/test_aihawk_job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_set_parameters(mocker, job_manager):
},
'remote': False,
'distance': 50,
'date': {'all time': True}
'date': {'all_time': True}
}

job_manager.set_parameters(params)
Expand Down

0 comments on commit 2f25118

Please sign in to comment.