diff --git a/Web/app.py b/Web/app.py index 31ec839..7a5b17f 100755 --- a/Web/app.py +++ b/Web/app.py @@ -2302,6 +2302,11 @@ def _upload_student_cards_excel(): if not ausweis_id and student_name: ausweis_id = generate_ausweis_id() + if ausweis_id in existing_ids: + row_errors.append(f'Automatisch erzeugte Ausweis-ID {ausweis_id} existiert bereits') + else: + while ausweis_id in existing_ids: + ausweis_id = generate_ausweis_id() validation_warnings.append((row_number, f'Ausweis-ID wurde automatisch erzeugt: {ausweis_id}')) existing_ids.add(ausweis_id.upper()) elif ausweis_id and not rollover_mode: