Skip to content

Commit

Permalink
fix: resolve UndefinedTableError when starting scheduled tasks with s…
Browse files Browse the repository at this point in the history
…lash command
  • Loading branch information
huenique committed Nov 8, 2021
1 parent adeda5f commit 2a219f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dayong/components/task_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ async def start_task(context: tanjun.abc.Context, source: str, db: Database):
)

try:
await db.create_table()
result = await db.get_row(task_model, "task_name")
if bool(result.one().run) is False:
raise PermissionError
Expand Down

0 comments on commit 2a219f1

Please sign in to comment.