ensure task.priority is number for apiv1