Commit 37e6dbcb authored by Gabriel Boudy's avatar Gabriel Boudy

section apparait dans la liste d'entrée au pot

parent 762d70a9
......@@ -270,11 +270,11 @@ def quick_search(term, old=False, byidbde=False, hide_solde=False, exclude=None,
#: Morceaux à injecter dans le squelette de la requête
pieces = {}
#: Champs toujours SELECTionnés (c = table comptes)
pieces["always_select"] = "c.pseudo, c.type, c.solde, c.prenom, c.nom, c.last_negatif"
pieces["always_select"] = "c.pseudo, c.type, c.solde, c.prenom, c.nom, c.last_negatif, adh.section"
#: Tables toujours présentes dans le FROM
pieces["always_from"] = "comptes AS c"
pieces["always_from"] = "comptes AS c , adhesions AS adh"
#: À tester dans tous les cas
pieces["always_where"] = "NOT (c.bloque OR c.deleted) AND c.idbde >= 0"
pieces["always_where"] = "NOT (c.bloque OR c.deleted) AND c.idbde >= 0 AND c.last_adhesion = adh.id"
#: Sauf si on est dans le cas de recherche byidbde, on affiche aussi les comptes bloqués
if byidbde:
pieces["always_where"] = "NOT c.deleted AND c.idbde >= 0"
......@@ -321,7 +321,7 @@ def quick_search(term, old=False, byidbde=False, hide_solde=False, exclude=None,
"specific_where" : _forge_test("c.nom", is_regex)},
"prenom" : {"specific_select" : "c.prenom AS terme, c.idbde",
"specific_from" : "",
"specific_where" : _forge_test("c.prenom", is_regex)}
"specific_where" : _forge_test("c.prenom", is_regex)},
}
# Ensuite on différencie le cas idbde de l'autre
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment