Skip to content

Commit

Permalink
Added null safety to the drupal gallery migration (#11393)
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhprabhakaran3 authored Sep 5, 2022
1 parent 9703b5d commit e184230
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def change
Node.all.each do |node|
new_revision = node.revisions.first.dup
gallery_images = ""
node.gallery.each do |image|
node&.gallery.each do |image|
html = "<a target='_blank' href='#{image&.image&.path(:original)}'><img rel='tooltip' data-title='#{image&.description}' style='margin-bottom:4px;' class='rounded' src='#{image&.image&.path(:thumb)}' /></a>"
gallery_images << html
end
Expand Down

0 comments on commit e184230

Please sign in to comment.