mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -04:00
fixing pagination and download links along with tests
This commit is contained in:
@@ -253,7 +253,12 @@ def get_notifications(service_id, message_type, status_override=None): # noqa
|
||||
)
|
||||
next_page = None
|
||||
|
||||
if "links" in notifications and notifications["links"].get("next", None):
|
||||
total_items = notifications.get("total", 0)
|
||||
if (
|
||||
"links" in notifications
|
||||
and notifications["links"].get("next", None)
|
||||
and total_items > 50
|
||||
):
|
||||
next_page = generate_next_dict(
|
||||
"main.view_notifications", service_id, page, url_args
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user