Micro-optimization

This commit is contained in:
Kovid Goyal 2018-02-08 19:44:53 +05:30
parent cbc95ed9e5
commit 20867c1687
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -547,7 +547,7 @@ def author_data(self, author_ids=None):
'''
af = self.fields['authors']
if author_ids is None:
author_ids = tuple(af.table.id_map)
return {aid:af.author_data(aid) for aid in af.table.id_map}
return {aid:af.author_data(aid) for aid in author_ids if aid in af.table.id_map}
@read_api