From 636173ffaf47ae08cfc69b5f3e8955f35c2c1452 Mon Sep 17 00:00:00 2001 From: d-m-u Date: Wed, 31 Jan 2018 09:27:07 -0500 Subject: [PATCH] Clean up the presence checks --- app/models/dialog_import_validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dialog_import_validator.rb b/app/models/dialog_import_validator.rb index 46da9a51ef9..ede7bfda5fa 100644 --- a/app/models/dialog_import_validator.rb +++ b/app/models/dialog_import_validator.rb @@ -57,7 +57,7 @@ def check_dialog_fields_for_validity(dialog_fields) def check_dialog_associations_for_validity(dialog_fields) associations = {} - dialog_fields.each { |df| associations.merge!(df["name"] => df["dialog_field_responders"]) unless df["dialog_field_responders"].nil? } + dialog_fields.each { |df| associations.merge!(df["name"] => df["dialog_field_responders"]) if df["dialog_field_responders"].present? } unless associations.blank? circular_references = @dialog_field_association_validator.circular_references(associations) raise DialogFieldAssociationCircularReferenceError, circular_references if circular_references