From 070a717235760950939d924a59002ea01bb80cd1 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Tue, 22 Sep 2020 20:25:42 +0200 Subject: [PATCH] Feat: better sequence count --- tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 2fb0597..0d5fe27 100644 --- a/tasks.py +++ b/tasks.py @@ -64,7 +64,7 @@ def sequence_prompt(): sequences = get_sequences(sequence["tribe"]) print("Séquences trouvées:\n\t" + "\n\t".join(sorted([s.name for s in sequences]))) - sequence["num"] = len(sequences) + 1 + sequence["num"] = max([int(seq.name[0:2]) for seq in sequences]) + 1 sequence["title"] = prompt(f"Nom de la séquence (n°{sequence['num']}): ") known_tags = get_tags()