Skip to content

Commit

Permalink
feat(api): specific route to get a list of group3
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Vergez authored and amandine-sahl committed Oct 26, 2023
1 parent fff5960 commit bf4e6b4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apptax/taxonomie/routestaxref.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,20 @@ def get_regneGroup2Inpn_taxref():
return results


@adresses.route("/groupe3_inpn", methods=["GET"])
@json_resp
def get_group3_inpn_taxref():
"""
Retourne la liste des groupes 3 inpn
"""
data = (
db.session.query(Taxref.group3_inpn)
.distinct(Taxref.group3_inpn)
.filter(Taxref.group3_inpn != None)
).all()
return [d[0] for d in data]


@adresses.route("/allnamebylist/<string:code_liste>", methods=["GET"])
@adresses.route("/allnamebylist", methods=["GET"])
@json_resp
Expand Down

0 comments on commit bf4e6b4

Please sign in to comment.