mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 18:18:26 -04:00
Add report options 1/3/5-day
This commit is contained in:
@@ -390,7 +390,7 @@ class Service(JSONModel, SortByNameMixin):
|
||||
def get_data_retention_item(self, id):
|
||||
return next((dr for dr in self.data_retention if dr["id"] == id), None)
|
||||
|
||||
def get_days_of_retention(self, notification_type):
|
||||
def get_days_of_retention(self, notification_type, number_of_days):
|
||||
return next(
|
||||
(
|
||||
dr
|
||||
@@ -398,7 +398,10 @@ class Service(JSONModel, SortByNameMixin):
|
||||
if dr["notification_type"] == notification_type
|
||||
),
|
||||
{},
|
||||
).get("days_of_retention", current_app.config["ACTIVITY_STATS_LIMIT_DAYS"])
|
||||
).get(
|
||||
"days_of_retention",
|
||||
current_app.config["ACTIVITY_STATS_LIMIT_DAYS"].get(number_of_days),
|
||||
)
|
||||
|
||||
@cached_property
|
||||
def organization(self):
|
||||
|
||||
Reference in New Issue
Block a user