Skip to content

Commit

Permalink
Fix(sqla) fix check_observation route
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Narcisi committed Aug 26, 2024
1 parent 4b10544 commit a6a9c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/geonature/core/gn_profiles/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def get_observation_score():
if type(data["life_stages"]) is not list:
raise BadRequest("life_stages must be a list")
for life_stage in data["life_stages"]:
life_stage_value = DB.get(TNomenclatures, life_stage)
life_stage_value = DB.get_or_404(TNomenclatures, life_stage)
q = q_pheno.where(VmCorTaxonPhenology.id_nomenclature_life_stage == life_stage)
r_life_stage = DB.session.execute(q).all()
if len(r_life_stage) == 0:
Expand Down

0 comments on commit a6a9c05

Please sign in to comment.