[fix] count is method

This commit is contained in:
Laurent Peuch 2018-09-03 06:18:05 +02:00
parent abcc170e08
commit 04cb5f0ec1

4
run.py
View file

@ -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]