X-Git-Url: https://apps.delaporte.us/gitweb/matrix-goal-bot.git/blobdiff_plain/a82ef10eea38d5cec30ae6e4b2d6a7257735ac53..f35e5f517d4e17c1de54bc2a9a0faa7e77d841b2:/goals/db.py diff --git a/goals/db.py b/goals/db.py index 6e53948..11b5467 100644 --- a/goals/db.py +++ b/goals/db.py @@ -92,6 +92,13 @@ class Data(): return session.exec(cmd).all() + def get_done_goals(self): + '''List all goals''' + with Session(self.engine) as session: + cmd = select(Goal).where(Goal.complete_date != None) + return session.exec(cmd).all() + + def get_goal(self, id): with Session(self.engine) as session: cmd = select(Goal).where(Goal.id == id)