Prevent ID missing when a device is deleted

This commit is contained in:
Adrien Ufferte
2026-01-26 10:02:08 +01:00
parent ed0239aa04
commit 4de859bc01
+5 -1
View File
@@ -129,7 +129,11 @@ func _on_logout_button_pressed() -> void:
func _on_devices_tab_container_tab_changed(tab: int) -> void:
lesson_unlocks.device = tab + 1
var device_tab: DeviceTab = devices_tab_container.get_tab_control(tab) as DeviceTab
if not device_tab:
Log.error("SettingsTeacherSettings: DeviceTab not found for tab " + str(tab))
return
lesson_unlocks.device = device_tab.device_id
func _on_student_pressed(code: int) -> void: