mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
@@ -408,7 +408,9 @@ def _query_for_billing_data(notification_type, start_date, end_date, service):
|
||||
func.count().label("notifications_sent"),
|
||||
)
|
||||
.filter(
|
||||
NotificationAllTimeView.status.in_(NotificationStatus.sent_email_types),
|
||||
NotificationAllTimeView.status.in_(
|
||||
NotificationStatus.sent_email_types()
|
||||
),
|
||||
NotificationAllTimeView.key_type.in_((KeyType.NORMAL, KeyType.TEAM)),
|
||||
NotificationAllTimeView.created_at >= start_date,
|
||||
NotificationAllTimeView.created_at < end_date,
|
||||
@@ -441,7 +443,7 @@ def _query_for_billing_data(notification_type, start_date, end_date, service):
|
||||
)
|
||||
.filter(
|
||||
NotificationAllTimeView.status.in_(
|
||||
NotificationStatus.billable_sms_types
|
||||
NotificationStatus.billable_sms_types()
|
||||
),
|
||||
NotificationAllTimeView.key_type.in_((KeyType.NORMAL, KeyType.TEAM)),
|
||||
NotificationAllTimeView.created_at >= start_date,
|
||||
|
||||
@@ -9,7 +9,7 @@ class PermissionDAO(DAOClass):
|
||||
model = Permission
|
||||
|
||||
def add_default_service_permissions_for_user(self, user, service):
|
||||
for name in PermissionType.defaults:
|
||||
for name in PermissionType.defaults():
|
||||
permission = Permission(permission=name, user=user, service=service)
|
||||
self.create_instance(permission, _commit=False)
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ def dao_create_service(
|
||||
raise ValueError("Can't create a service without a user")
|
||||
|
||||
if service_permissions is None:
|
||||
service_permissions = ServicePermissionType.defaults
|
||||
service_permissions = ServicePermissionType.defaults()
|
||||
|
||||
organization = dao_get_organization_by_email_address(user.email_address)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user