Browse Source

feat: check if managing org exists before trying to show it

fix-remove-attr-accessors-from-questions-in-cldc-1723
Sam Seed 2 years ago
parent
commit
ee469ccd29
  1. 4
      app/models/form/lettings/questions/managing_organisation.rb

4
app/models/form/lettings/questions/managing_organisation.rb

@ -16,7 +16,9 @@ class Form::Lettings::Questions::ManagingOrganisation < ::Form::Question
return opts unless current_user
return opts unless log
opts = opts.merge({ log.managing_organisation.id => log.managing_organisation.name} )
if log.managing_organisation.present?
opts = opts.merge({ log.managing_organisation.id => log.managing_organisation.name} )
end
if current_user.support?
if log.owning_organisation.holds_own_stock?

Loading…
Cancel
Save