|
@@ -97,11 +97,14 @@ def event_loop(window):
|
|
|
print('Please select a Task before stopping the timer')
|
|
|
|
|
|
if add_sub_task_button_is_pushed(event):
|
|
|
- sub_task_name = window.Element(NEW_TASK_TEXT_KEY).get()
|
|
|
+ sub_task_name = str(window.Element(NEW_TASK_TEXT_KEY).get())
|
|
|
sub_task_name_already_in_use = sub_task_name in taskHandler.get_task_tree_name_strings(
|
|
|
taskHandler.root_task)
|
|
|
+ sub_task_contains_slash = '/' in sub_task_name
|
|
|
if sub_task_name_already_in_use:
|
|
|
print('Error: Task name ' + sub_task_name + ' already used, please enter another one')
|
|
|
+ elif sub_task_contains_slash:
|
|
|
+ print('Error: Task name ' + sub_task_name + " contains a '/' please enter a name without this symbol")
|
|
|
elif sub_task_name:
|
|
|
parent_task_name = window.Element(TASK_TREE_COMBO_NAME).get()
|
|
|
if parent_task_name:
|