def insertOrUpdate(self, l): """ Inserts or updates a whole list of tasks """ for t in l: debug(0, "Inserting (or updating) task into DB: " + str(t)) Task.insertOrUpdate(t) self.beginResetModel() self.refreshTasks() self.endResetModel()
def refreshTasks(self): self.tasks = Task.get(self.currentList)