From 6ed4e669ef7cb857c7b0ac774c41e8f9c7758217 Mon Sep 17 00:00:00 2001 From: Joris Date: Fri, 8 May 2020 19:35:08 +0200 Subject: Add duration to tasks --- src/gui/tasks/widget.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/tasks/widget.py') diff --git a/src/gui/tasks/widget.py b/src/gui/tasks/widget.py index bca6585..6fa8bf0 100644 --- a/src/gui/tasks/widget.py +++ b/src/gui/tasks/widget.py @@ -4,7 +4,7 @@ import db.tasks import gui.tasks.signal import gui.tasks.table.widget import gui.icons -from model.task import TaskForm +from model.task import ValidTaskForm def widget(database, parent): widget = QtWidgets.QWidget(parent) @@ -30,10 +30,10 @@ def show_add_dialog(database, parent_widget, add_task_signal): 'Add a task', 'add', None, - lambda taskForm: on_add(database, taskForm, add_task_signal)) + lambda form: on_add(database, form, add_task_signal)) dialog.exec_() -def on_add(database, taskForm: TaskForm, add_task_signal): - task = db.tasks.insert(database.cursor(), taskForm) +def on_add(database, form: ValidTaskForm, add_task_signal): + task = db.tasks.insert(database.cursor(), form) database.commit() add_task_signal.emit(task) -- cgit v1.2.3