From 04cb5f0ec18def9d50fa861c16d491275843b9e7 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 3 Sep 2018 06:18:05 +0200 Subject: [PATCH] [fix] count is method --- run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index 49e49a4..92d533d 100644 --- a/run.py +++ b/run.py @@ -416,8 +416,8 @@ async def api_stop_job(request, job_id): job = Job.select().where(Job.id == job_id) - if job.count == 0: - raise NotFound() + if job.count() == 0: + raise NotFound(f"Error: no job with the id '{job_id}'") job = job[0]