Skip to content

Commit

Permalink
style(api): applied black
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Vergez committed Jul 3, 2023
1 parent 381b51a commit 451ac2f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@


# revision identifiers, used by Alembic.
revision = 'fd5ed3f94d0f'
down_revision = '3bd542b72955'
revision = "fd5ed3f94d0f"
down_revision = "3bd542b72955"
branch_labels = None
depends_on = None

Expand Down
2 changes: 1 addition & 1 deletion apptax/taxonomie/routesbibattributs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_bibattributsbyTaxref(regne, group2_inpn=None):
q = q.filter(
or_(BibAttributs.group2_inpn == group2_inpn, BibAttributs.group2_inpn == None)
)
#TODO: ajouter group3_inpn ?
# TODO: ajouter group3_inpn ?
results = q.all()

attDict = {}
Expand Down
8 changes: 7 additions & 1 deletion apptax/taxonomie/routesbiblistes.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ def get_biblistesbyTaxref(regne, group_inpn=None):
if regne:
q = q.filter(or_(BibListes.regne == regne, BibListes.regne == None))
if group_inpn:
q = q.filter(or_(BibListes.group2_inpn == group_inpn, BibListes.group3_inpn == group_inpn, BibListes.group2_inpn == None))
q = q.filter(
or_(
BibListes.group2_inpn == group_inpn,
BibListes.group3_inpn == group_inpn,
BibListes.group2_inpn == None,
)
)
results = q.all()
return [liste.as_dict() for liste in results]

Expand Down
4 changes: 3 additions & 1 deletion apptax/taxonomie/routestaxref.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ def get_regneGroup2Inpn_taxref():
results[d.regne] = ["", d.group2_inpn]
return results


@adresses.route("/regnewithgroupe3", methods=["GET"])
@json_resp
def get_regneGroup3Inpn_taxref():
Expand All @@ -338,6 +339,7 @@ def get_regneGroup3Inpn_taxref():
results[d.regne] = ["", d.group3_inpn]
return results


@adresses.route("/allnamebylist/<string:code_liste>", methods=["GET"])
@adresses.route("/allnamebylist", methods=["GET"])
@json_resp
Expand Down Expand Up @@ -421,7 +423,7 @@ def get_AllTaxrefNameByListe(code_liste=None):
if group2_inpn:
q = q.filter(VMTaxrefListForautocomplete.group2_inpn == group2_inpn)

#TODO: add group3 here after migration
# TODO: add group3 here after migration

limit = request.args.get("limit", 20, int)
page = request.args.get("page", 1, int)
Expand Down

0 comments on commit 451ac2f

Please sign in to comment.