Skip to content

Commit

Permalink
Merge pull request #16919 from d-m-u/cleaning_up_import_stuff
Browse files Browse the repository at this point in the history
Remove empty array associations created via UI from association list
(cherry picked from commit bcc70a2)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1559475
  • Loading branch information
gmcculloug authored and simaishi committed Mar 22, 2018
1 parent 355c506 commit 760adf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/dialog_import_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 760adf1

Please sign in to comment.