mirror of
https://gitlab.crans.org/bde/nk20-scripts
synced 2024-11-26 02:23:52 +00:00
fix bug
This commit is contained in:
parent
98addc1db9
commit
daba34101e
@ -173,12 +173,12 @@ def import_transaction(cur):
|
||||
cur.execute(
|
||||
"SELECT t.date AS transac_date, t.type, t.emetteur,\
|
||||
t.destinataire,t.quantite, t.montant, t.description,\
|
||||
t.valide, t.cantinvalidate, t.categorie \
|
||||
t.valide, t.cantinvalidate, t.categorie, \
|
||||
a.idbde, a.annee, a.wei, a.date AS adh_date, a.section\
|
||||
FROM transactions AS t \
|
||||
LEFT JOIN adhesions AS a ON t.id = a.idtransaction \
|
||||
WHERE transactions.id> {} \
|
||||
ORDER BY transactions.id;".format(idmin)
|
||||
WHERE t.id> {} \
|
||||
ORDER BY t.id;".format(idmin)
|
||||
)
|
||||
n = cur.rowcount
|
||||
for idx, row in enumerate(cur):
|
||||
@ -303,7 +303,7 @@ def import_aliases(cur):
|
||||
cur.execute("SELECT * FROM aliases ORDER by id")
|
||||
n = cur.rowcount
|
||||
for idx, row in enumerate(cur):
|
||||
update_line(idx, n, row["titre"])
|
||||
update_line(idx, n, row["alias"])
|
||||
alias_name = row["alias"]
|
||||
alias_name_good = (alias_name[:252] + '...') if len(alias_name) > 255 else alias_name
|
||||
obj_dict = {
|
||||
@ -469,7 +469,6 @@ class Command(BaseCommand):
|
||||
parser.add_argument('-t', '--transactions', action='store_true', help="import transaction")
|
||||
parser.add_argument('-al', '--aliases', action='store_true', help="import aliases")
|
||||
parser.add_argument('-ac', '--activities', action='store_true', help="import activities")
|
||||
parser.add_argument('-M', '--memberships', action='store_true', help="import memberships")
|
||||
parser.add_argument('-r', '--remittances', action='store_true', help="import check remittances")
|
||||
parser.add_argument('-s', '--save', action='store', help="save mapping of idbde")
|
||||
parser.add_argument('-m', '--map', action='store', help="import mapping of idbde")
|
||||
|
Loading…
Reference in New Issue
Block a user