Host information for a job instance might be None eg. When job is not run tru kickstart like create_dir job etc. So while getting job details use a left outer join instead of INNER join.