changes to be implementet to fix the crutial mistake of the variable passing

This commit is contained in:
2026-09-23 21:36:44 +02:00
parent 72e8a8cf5d
commit fb2ba86140
+5
View File
@@ -2302,6 +2302,11 @@ def _upload_student_cards_excel():
if not ausweis_id and student_name: if not ausweis_id and student_name:
ausweis_id = generate_ausweis_id() 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}')) validation_warnings.append((row_number, f'Ausweis-ID wurde automatisch erzeugt: {ausweis_id}'))
existing_ids.add(ausweis_id.upper()) existing_ids.add(ausweis_id.upper())
elif ausweis_id and not rollover_mode: elif ausweis_id and not rollover_mode: