NoMethodError in Job_opening#show

Showing job_opening/_job_opening.rhtml where line #24 raised:

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name

Extracted source (around line #24):

21:   </tr>
22:   <tr>
23:     <th scope="row"><%= s(:taskmaster) %></th>
24:     <td><%= if companies_module_enabled? then job_opening.company.name 
25:                                          else job_opening.employer end %></td>
26:   </tr>
27:   <tr>

Trace of template inclusion: /job_opening/show.rhtml

RAILS_ROOT: /srv/www/vhosts/hcs-bwel/releases/201909172230

Application Trace | Framework Trace | Full Trace
app/views/job_opening/_job_opening.rhtml:24:in `_run_erb_47app47views47job_opening47_job_opening46rhtml'
app/views/job_opening/show.rhtml:21:in `_run_erb_47app47views47job_opening47show46rhtml'

Request

Parameters:

{"id"=>"268"}

Show session dump

Response

Headers:

{"cookie"=>[],
 "Cache-Control"=>"no-cache",
 "X-Powered-By"=>nil}