Commit dda4cedc authored by Gabriel Boudy's avatar Gabriel Boudy

Fix de d9ee6deb0dd0bc329aea747aa25f78f2eff1d435

parent b31bcdec
......@@ -269,12 +269,12 @@ 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, adh.section"
#: Tables toujours présentes dans le FROM
pieces["always_from"] = "comptes AS c , adhesions AS adh"
#: Champs toujours SELECTionnés (c = table comptes ; section courante, si inexistante alors Club)
pieces["always_select"] = "c.pseudo, c.type, c.solde, c.prenom, c.nom, c.last_negatif, COALESCE(adh.section, 'Club') AS section"
#: Tables toujours présentes dans le FROM ; le LEFT JOIN maintient les Clubs n'ayant pas adhéré
pieces["always_from"] = "comptes AS c LEFT JOIN adhesions AS adh ON c.last_adhesion = adh.id"
#: À tester dans tous les cas
pieces["always_where"] = "NOT (c.bloque OR c.deleted) AND c.idbde >= 0 AND c.last_adhesion = adh.id"
pieces["always_where"] = "NOT (c.bloque OR c.deleted) AND c.idbde >= 0"
#: 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"
......
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