Add type=int to request.args.get, if the arg is an int it's returned else None. This means we ignore the arg if its the wrong data type and we don't need to handle the error.

This commit is contained in:
Rebecca Law
2019-12-06 13:10:38 +00:00
parent 203e19bef3
commit 921b90cdec
4 changed files with 28 additions and 37 deletions

View File

@@ -10,6 +10,8 @@ from app.utils import midnight_n_days_ago
def dao_get_uploads_by_service_id(service_id, limit_days=None, page=1, page_size=50):
# Hardcoded filter to exclude cancelled or scheduled jobs
# for the moment, but we may want to change this method take 'statuses' as a argument in the future
jobs_query_filter = [
Job.service_id == service_id,
Job.original_file_name != current_app.config['TEST_MESSAGE_FILENAME'],