diff --git a/app/dao/services_dao.py b/app/dao/services_dao.py index b9de79859..58ae9ea3d 100644 --- a/app/dao/services_dao.py +++ b/app/dao/services_dao.py @@ -544,8 +544,8 @@ def dao_find_services_sending_to_tv_numbers(start_date, end_date, threshold=500) Notification.notification_type == SMS_TYPE, func.substr(Notification.normalised_to, 3, 7) == '7700900', Service.restricted == False, # noqa - Service.research_mode == False, - Service.active == True, + Service.research_mode == False, # noqa + Service.active == True, # noqa ).group_by( Notification.service_id, ).having( @@ -564,8 +564,8 @@ def dao_find_services_with_high_failure_rates(start_date, end_date, threshold=10 Notification.key_type != KEY_TYPE_TEST, Notification.notification_type == SMS_TYPE, Service.restricted == False, # noqa - Service.research_mode == False, - Service.active == True, + Service.research_mode == False, # noqa + Service.active == True, # noqa ).group_by( Notification.service_id, ).having( @@ -590,8 +590,8 @@ def dao_find_services_with_high_failure_rates(start_date, end_date, threshold=10 Notification.notification_type == SMS_TYPE, Notification.status == NOTIFICATION_PERMANENT_FAILURE, Service.restricted == False, # noqa - Service.research_mode == False, - Service.active == True, + Service.research_mode == False, # noqa + Service.active == True, # noqa ).group_by( Notification.service_id, subquery.c.total_count diff --git a/app/dao/uploads_dao.py b/app/dao/uploads_dao.py index cb04617a9..29fa25fb8 100644 --- a/app/dao/uploads_dao.py +++ b/app/dao/uploads_dao.py @@ -84,7 +84,7 @@ def dao_get_uploads_by_service_id(service_id, limit_days=None, page=1, page_size Notification.notification_type == LETTER_TYPE, Notification.api_key_id == None, # noqa Notification.status != NOTIFICATION_CANCELLED, - Template.hidden == True, + Template.hidden == True, # noqa Notification.created_at >= today - func.coalesce(ServiceDataRetention.days_of_retention, 7) ] if limit_days is not None: diff --git a/requirements_for_test.txt b/requirements_for_test.txt index 36464b7b7..56e180c0e 100644 --- a/requirements_for_test.txt +++ b/requirements_for_test.txt @@ -1,5 +1,5 @@ -r requirements.txt -flake8==3.8.4 +flake8==4.0.1 flake8-bugbear==20.11.1 isort==5.7.0 moto==2.0.11