Skip to content

Commit

Permalink
taxon list: Switch to non-blocking request for up to 5 pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
synrg committed Aug 14, 2024
1 parent b30e8e5 commit d13f8a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inatcog/commands/taxon.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ async def taxon_list(self, ctx, *, query: Optional[str]):
)
_per_rank = "child"
else:
taxon_list = [taxon, *_children, *_descendants.all()]
taxon_list = [
taxon,
*_children,
*(await _descendants.async_all()),
]
if _per_rank != "child":
# List all ranks at the same level, not just the specified rank
_per_rank = RANKS_FOR_LEVEL[rank_level]
Expand Down

0 comments on commit d13f8a7

Please sign in to comment.