diff options
| author | Florian Fuchs | 2013-03-20 16:28:47 -0700 |
|---|---|---|
| committer | Florian Fuchs | 2013-03-20 16:28:47 -0700 |
| commit | c7133b754546d60f74f4297be1c4c00ffe3a6abf (patch) | |
| tree | e28d7d5c24eac4b9dbc0db7c0cb22f95249e513f /src | |
| parent | e0b49799398b97b55d99002e12ce37e394c5cd3d (diff) | |
| download | mailman-c7133b754546d60f74f4297be1c4c00ffe3a6abf.tar.gz mailman-c7133b754546d60f74f4297be1c4c00ffe3a6abf.tar.zst mailman-c7133b754546d60f74f4297be1c4c00ffe3a6abf.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/rest/helpers.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py index 17663e1b4..57026d40a 100644 --- a/src/mailman/rest/helpers.py +++ b/src/mailman/rest/helpers.py @@ -137,10 +137,14 @@ def paginate(default_count=None): # Set indices list_start = 0 list_end = None + # get the result + result = function(*args, **kwargs) + # slice list only if count is not None if count is not None: list_start = int((page - 1) * count) list_end = int(page * count) - return function(*args, **kwargs)[list_start:list_end] + return result[list_start:list_end] + return result return wrapper return dec |
