if@scheme.present?&&@scheme.arrangement_type_same?&&required_params[:arrangement_type]!="The same organisation that owns the housing stock"&&required_params[:managing_organisation_id].blank?
required_params[:managing_organisation_id]=nil
end
ifrequired_params[:arrangement_type]=="The same organisation that owns the housing stock"
let(:scheme){FactoryBot.create(:scheme,owning_organisation_id:case_log.created_by.organisation_id,arrangement_type:"The same organisation that owns the housing stock",primary_client_group:"Q",secondary_client_group:"P")}