No need to enumerate chunks.
This commit is contained in:
parent
3999817cc9
commit
5c51341e7f
2
app.py
2
app.py
|
@ -469,7 +469,7 @@ def get_labels(keys, name=None):
|
|||
if isinstance(from_cache, dict) and from_cache.get('keys') == keys:
|
||||
labels = from_cache['labels']
|
||||
if not labels:
|
||||
for num, cur in enumerate(utils.chunk(keys, 50)):
|
||||
for cur in utils.chunk(keys, 50):
|
||||
labels += mediawiki.get_entities(cur, props='labels')
|
||||
|
||||
json.dump({'keys': keys, 'labels': labels},
|
||||
|
|
Loading…
Reference in a new issue