Prevent traceback when job is None.
Merge pull request #9145 from cro/develop

Prevent traceback when job is None.