Skip to content

Commit 8d03d00

Browse files
Merge pull request #5819 from nhsuk/alistair/national-reporting-fix-show-programme-status
Don't show programme status row if there are no statuses
2 parents 1dedc31 + 0e4a15f commit 8d03d00

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/components/app_patient_search_result_card_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ def call
105105
to: :helpers
106106

107107
def programme_status_tag
108-
return if programmes.empty?
109-
110108
status_by_programme =
111109
programmes.each_with_object({}) do |programme, hash|
112110
resolved_status =
@@ -119,6 +117,8 @@ def programme_status_tag
119117
hash[resolved_status.fetch(:prefix)] = resolved_status
120118
end
121119

120+
return if status_by_programme.empty?
121+
122122
render AppAttachedTagsComponent.new(status_by_programme)
123123
end
124124

0 commit comments

Comments
 (0)