From: Edward Delaporte Date: Wed, 15 Apr 2026 17:53:20 +0000 (-0500) Subject: Fixup X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-goal-bot.git/commitdiff_plain/421f514aa0533cdcead40f2c689548b96a29885e?ds=sidebyside Fixup --- diff --git a/matrix_goal_bot/db.py b/matrix_goal_bot/db.py index a746c59..3f83341 100644 --- a/matrix_goal_bot/db.py +++ b/matrix_goal_bot/db.py @@ -28,7 +28,7 @@ class PreferGoal(SQLModel, table=True): class Goal(SQLModel, table=True): id: int | None = Field(default=None, primary_key=True) name: str = Field(default=None, unique=True) - start_date: dt | None = Field(default=today()) + start_date: dt | None = Field(default=dt.today()) complete_date: dt | None = Field(default=None) vision_id: int | None = Field(default=None, foreign_key="vision.id") notes: str | None = Field(default=None) @@ -134,7 +134,7 @@ class Data(): def get_current_goals(self): '''List current goals''' with Session(self.engine) as session: - cmd = select(Goal).where(Goal.complete_date == None).where(Goal.start_date <= today()) + cmd = select(Goal).where(Goal.complete_date == None).where(Goal.start_date <= dt.today()) results = session.exec(cmd).all() logger.debug(f'Current goals: {results}') return results diff --git a/matrix_goal_bot/tasks.py b/matrix_goal_bot/tasks.py index 4fd4ce5..1bacd91 100644 --- a/matrix_goal_bot/tasks.py +++ b/matrix_goal_bot/tasks.py @@ -41,7 +41,6 @@ def remove_task(c, goal_id, name): print(result) - @task def list(c): goals = Data().get_current_goals()