# HG changeset patch # User Goffi # Date 1619108772 -7200 # Node ID 91da42d44ea29bc97c567b06fac4ecb64726673b # Parent c57b9ede13817983e678f041b322745c000d01b6 mam: fix `page_max` calculation, thus `complete` attribute diff -r c57b9ede1381 -r 91da42d44ea2 sat_pubsub/mam.py --- 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