Skip to content

Commit

Permalink
Fix limit taxa list
Browse files Browse the repository at this point in the history
  • Loading branch information
hypsug0 committed Apr 25, 2024
1 parent 68469ff commit 5aabbdf
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions backend/gncitizen/utils/taxonomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@

def taxhub_rest_get_taxon_list(taxhub_list_id: int) -> Dict:
url = f"{TAXHUB_API}biblistes/taxons/{taxhub_list_id}"
params = {
"existing": "true",
"order": "asc",
"orderby": "taxref.nom_complet",
}
params = {"existing": "true", "order": "asc", "orderby": "taxref.nom_complet", "limit": 100000}
res = session.get(
url,
params=params,
Expand Down Expand Up @@ -81,9 +77,7 @@ def taxhub_rest_get_taxon(taxhub_id: int) -> Taxon:
media_types = ("Photo_gncitizen", "Photo_principale", "Photo")
i = 0
while i < len(media_types):
filtered_medias = [
d for d in data["medias"] if d["nom_type_media"] == media_types[i]
]
filtered_medias = [d for d in data["medias"] if d["nom_type_media"] == media_types[i]]
if len(filtered_medias) >= 1:
break
i += 1
Expand Down

0 comments on commit 5aabbdf

Please sign in to comment.