Skip to content

Commit 473a68e

Browse files
committed
Remove !a.blank and plan operator
1 parent 12e0a03 commit 473a68e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/presenters/api/v2/plan_presenter.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def identifier
3636
end
3737

3838
# Fetch all questions and answers from a plan, regardless of theme
39-
def fetch_all_q_and_a # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity
40-
return [] unless @plan&.questions.present?
39+
def fetch_all_q_and_a
40+
return [] unless @plan.questions.present?
4141

4242
@plan.questions.filter_map do |q|
4343
a = @plan.answers.find { |ans| ans.question_id == q.id }
44-
next unless a.present? && !a.blank?
44+
next unless a.present?
4545

4646
{
4747
title: "Question #{q.number || q.id}",

app/views/api/v2/datasets/_show.json.jbuilder

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if output.is_a?(ResearchOutput)
77

88
json.type output.output_type
99
json.title output.title
10-
json.doi_url output.doi_url
10+
# json.doi_url output.doi_url
1111
json.description output.description
1212
json.personal_data Api::V2::ApiPresenter.boolean_to_yes_no_unknown(value: output.personal_data)
1313
json.sensitive_data Api::V2::ApiPresenter.boolean_to_yes_no_unknown(value: output.sensitive_data)

0 commit comments

Comments
 (0)