Skip to content

Commit 682adbd

Browse files
committed
Remove default value for jobs url
1 parent 6d6c23c commit 682adbd

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

app/models/organisation.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class Organisation < ApplicationRecord
99

1010
date_attributes(:closed_at)
1111

12-
DEFAULT_JOBS_URL = "https://www.civilservicejobs.service.gov.uk/csr".freeze
1312
FEATURED_DOCUMENTS_DISPLAY_LIMIT = 6
1413

1514
has_one :default_news_image, class_name: "FeaturedImageData", as: :featured_imageable, inverse_of: :featured_imageable
@@ -416,7 +415,7 @@ def select_name
416415
end
417416

418417
def jobs_url
419-
custom_jobs_url.presence || DEFAULT_JOBS_URL
418+
custom_jobs_url.presence
420419
end
421420

422421
def indexable_content

app/presenters/publishing_api/corporate_information_page_presenter.rb

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ def page_content_ids_by_menu_heading(menu_heading)
153153
end
154154

155155
def payload_for_jobs
156+
return if organisation.jobs_url.blank?
157+
156158
{
157159
title: "Jobs",
158160
url: organisation.jobs_url,

app/presenters/publishing_api/organisation_presenter.rb

+6-4
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,12 @@ def corporate_information_pages
202202
}
203203
end
204204

205-
cips << {
206-
title: I18n.t("organisation.corporate_information.jobs"),
207-
href: item.jobs_url,
208-
}
205+
if item.jobs_url.present?
206+
cips << {
207+
title: I18n.t("organisation.corporate_information.jobs"),
208+
href: item.jobs_url,
209+
}
210+
end
209211

210212
cips
211213
end

0 commit comments

Comments
 (0)