warn about truncated replies without pagination

This commit is contained in:
Min RK
2021-08-23 10:24:09 +02:00
parent fd644476a7
commit 7f480445f6
2 changed files with 11 additions and 1 deletions

View File

@@ -57,6 +57,11 @@ class GroupListAPIHandler(_GroupAPIHandler):
total_count = full_query.count()
data = self.paginated_model(group_list, offset, limit, total_count)
else:
query_count = query.count()
if offset == 0 and total_count > query_count:
self.log.warning(
f"Truncated group list in request that does not expect pagination. Replying with {query_count} of {total_count} total groups."
)
data = group_list
self.write(json.dumps(data))