Describe the bug
In scheduler.models.task the function get_scheduled_task raise the wrong error when a task is not found.
To Reproduce
- Have a valid task of type CronTaskType
- Open a django shell
- import the function and it's dependecies
- run get_scheduled_task using the right type and id
- update the id to a non existing one
- you get
Traceback (most recent call last):
File "", line 1, in
File "", line 11, in get_scheduled_task
ValueError: Invalid task type CronTaskType
Expected behavior
You should get Job does not exists error
Desktop (please complete the following information):
- OS: Ubuntu 24.04
- python version: 3.12
- django version: 5.2
Describe the bug
In scheduler.models.task the function get_scheduled_task raise the wrong error when a task is not found.
To Reproduce
Expected behavior
You should get Job does not exists error
Desktop (please complete the following information):