def get(self):
        """
        List all tasks registered to user
        """
        result = []
        try:
            user = User.query.filter_by(username=current_user.username).first()
            if user.task_ids:
                logger.debug('Current registered task_ids: {}'.format(user.task_ids))
                tasks = json.loads(user.task_ids)
            else:
                logger.debug('No task_ids registered with current user')
                tasks = None
            if tasks:
                for task_id in tasks:
                    task_dict = {}
                    try:
                        task = Tasks.query.filter_by(id=task_id).first()
                        task_dict['task_id'] = uuid.UUID(task_id)
                        task_dict['name'] = task.name
                        job_list = []
                        for job_id in json.loads(task.job_ids):
                            job_deets = {}
                            if session:
                                if check_jobid(job_id):
                                    job = self.q.fetch_job(job_id)
                                else:
                                    job = None
                            if job:
                                job_deets = get_jobdetails(job.description)
                                job_deets['job_id'] = job_id
                                job_list.append(job_deets)
                        task_dict['jobs'] = job_list
                        result.append(task_dict)
                    except AttributeError as err:
                        logger.debug('Task does not exist: {}'.format(err))
        except AttributeError as err:
            logger.debug('Error getting task list: {}'.format(err))
            abort(404)
        except Exception as err:
            logger.debug('Error getting task list: {}'.format(err))
            return {'msg': 'API error fetching task list'}, 500
        return jsonify(result), 200

        List all tasks registered to user
        
crackq/cq_api.py