forked from LBRYCommunity/lbry-sdk
typo
This commit is contained in:
parent
67c5c192f3
commit
1228700487
2 changed files with 3 additions and 3 deletions
|
@ -226,7 +226,7 @@ def protobuf_search_claims(**constraints) -> str:
|
||||||
|
|
||||||
def search_claims(**constraints) -> Tuple[List[Output], Optional[int], Optional[Censor]]:
|
def search_claims(**constraints) -> Tuple[List[Output], Optional[int], Optional[Censor]]:
|
||||||
total = None
|
total = None
|
||||||
if constraints.pop('include_totals', False):
|
if constraints.pop('include_total', False):
|
||||||
total = search_claim_count(**constraints)
|
total = search_claim_count(**constraints)
|
||||||
constraints['offset'] = abs(constraints.get('offset', 0))
|
constraints['offset'] = abs(constraints.get('offset', 0))
|
||||||
constraints['limit'] = min(abs(constraints.get('limit', 10)), 50)
|
constraints['limit'] = min(abs(constraints.get('limit', 10)), 50)
|
||||||
|
|
|
@ -1631,7 +1631,7 @@ class API:
|
||||||
page_size = min(abs(pagination['page_size'] or DEFAULT_PAGE_SIZE), 50)
|
page_size = min(abs(pagination['page_size'] or DEFAULT_PAGE_SIZE), 50)
|
||||||
claim_filter_dict.update({
|
claim_filter_dict.update({
|
||||||
'offset': page_size * (page_num - 1), 'limit': page_size,
|
'offset': page_size * (page_num - 1), 'limit': page_size,
|
||||||
'include_totals': pagination['include_totals'],
|
'include_total': pagination['include_total'],
|
||||||
'order_by': order_by
|
'order_by': order_by
|
||||||
})
|
})
|
||||||
if protobuf:
|
if protobuf:
|
||||||
|
@ -1645,7 +1645,7 @@ class API:
|
||||||
"page": page_num,
|
"page": page_num,
|
||||||
"page_size": page_size
|
"page_size": page_size
|
||||||
}
|
}
|
||||||
if pagination['include_totals']:
|
if pagination['include_total']:
|
||||||
d['total_pages'] = int((result.total + (page_size - 1)) / page_size)
|
d['total_pages'] = int((result.total + (page_size - 1)) / page_size)
|
||||||
d['total_items'] = result.total
|
d['total_items'] = result.total
|
||||||
return d
|
return d
|
||||||
|
|
Loading…
Reference in a new issue