Mercurial > libervia-pubsub
diff sat_pubsub/mam.py @ 449:91da42d44ea2
mam: fix `page_max` calculation, thus `complete` attribute
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 22 Apr 2021 18:26:12 +0200 |
parents | 5e8b8ef5c862 |
children | bcbd2399bfee |
line wrap: on
line diff
--- a/sat_pubsub/mam.py Wed Apr 14 13:51:50 2021 +0200 +++ b/sat_pubsub/mam.py Thu Apr 22 18:26:12 2021 +0200 @@ -116,7 +116,7 @@ # and RSM element data. In this case, we must have the # "complete" # attribute set to "true". - page_max = (int(rsm_elt.first['index']) + 1) * mam_request.rsm.max + page_max = int(rsm_elt.first['index']) + mam_request.rsm.max count = int(str(rsm_elt.count)) if page_max >= count: # the maximum items which can be displayed is equal to or