From 13b01579c83dc9b8cc428bd4da1fbee71966c8ac Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Wed, 6 Apr 2022 11:53:01 +0100 Subject: [PATCH] Limit provider history to 100 results This stops the pages being slow to load and defers the need to add any pagination. Only the most recent data is likely to be relevant. --- app/dao/provider_details_dao.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/dao/provider_details_dao.py b/app/dao/provider_details_dao.py index 69665ef4d..25d82d38f 100644 --- a/app/dao/provider_details_dao.py +++ b/app/dao/provider_details_dao.py @@ -36,6 +36,8 @@ def dao_get_provider_versions(provider_id): id=provider_id ).order_by( desc(ProviderDetailsHistory.version) + ).limit( + 100 # limit results instead of adding pagination ).all()