Fixed bug: view.add_job fails when job parameter contains Job object

Found bug in my previous pull request and fixed it. Easy fix, but not covered by unit test yet, I will work on it.