X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-goal-bot.git/blobdiff_plain/04946021957ba7daaad42df10973e2e5dfaf89bd..a82ef10eea38d5cec30ae6e4b2d6a7257735ac53:/goals/db.py diff --git a/goals/db.py b/goals/db.py index f7fa239..6e53948 100644 --- a/goals/db.py +++ b/goals/db.py @@ -52,13 +52,14 @@ class Task(SQLModel, table=True): def pretty_print(goal, tasks): results = [] results.append(f' ## {goal}') + if not tasks: + results.append('-- Nothing to list --') + for task in tasks: if(task.complete_date): results.append(f' - [x] {task}') else: results.append(f' - [ ] {task}') - else: - results.append('-- Nothing to list --') return results @@ -157,7 +158,6 @@ class Data(): goal = session.exec(cmd).first() goal.vision_id = vision_id session.commit() - return 'Success' def add_note(self, note, goal): '''Notes print with the goal.'''