Fixed potential exception in start if user enter invalid value inside the combined arms slots entry.

This commit is contained in:
Khopa 2018-09-29 11:55:42 +02:00
parent 93d0746d3e
commit 2cbe63f162

View File

@ -154,7 +154,10 @@ class EventMenu(Menu):
self.event.is_awacs_enabled = False
ca_slot_entry_value = self.ca_slot_entry.get()
ca_slots = int(ca_slot_entry_value and ca_slot_entry_value or "0")
try:
ca_slots = int(ca_slot_entry_value and ca_slot_entry_value or "0")
except:
ca_slots = 0
self.event.ca_slots = ca_slots
flights = {k: {} for k in self.event.tasks} # type: db.TaskForceDict