Fix problem where a task attempt was trying to be retrieved for a non logged-in user