mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Remove provider_statistics_dao.get_provider_statistics
The provider_statistics table is no longer being populated, get rid of any reads from this table.
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
from sqlalchemy import func, cast, Float, case
|
||||
from sqlalchemy import func
|
||||
|
||||
from app import db
|
||||
from app.models import (
|
||||
ProviderStatistics,
|
||||
ProviderDetails,
|
||||
NotificationHistory,
|
||||
SMS_TYPE,
|
||||
EMAIL_TYPE,
|
||||
@@ -12,15 +10,6 @@ from app.models import (
|
||||
)
|
||||
|
||||
|
||||
def get_provider_statistics(service, **kwargs):
|
||||
query = ProviderStatistics.query.filter_by(service=service)
|
||||
if 'providers' in kwargs:
|
||||
providers = ProviderDetails.query.filter(ProviderDetails.identifier.in_(kwargs['providers'])).all()
|
||||
provider_ids = [provider.id for provider in providers]
|
||||
query = query.filter(ProviderStatistics.provider_id.in_(provider_ids))
|
||||
return query
|
||||
|
||||
|
||||
def get_fragment_count(service_id):
|
||||
shared_filters = [
|
||||
NotificationHistory.service_id == service_id,
|
||||
|
||||
Reference in New Issue
Block a user