Showing
2 changed files
with
4 additions
and
1 deletions
| @@ -118,9 +118,11 @@ module Kanjai | @@ -118,9 +118,11 @@ module Kanjai | ||
| 118 | scope = {lang: lang, row_item: index, repeat_id: repeat_id, parent_id: parent_id} | 118 | scope = {lang: lang, row_item: index, repeat_id: repeat_id, parent_id: parent_id} |
| 119 | 119 | ||
| 120 | exist_markers = page_content.page_content_markers.where(scope).pluck(:marker) | 120 | exist_markers = page_content.page_content_markers.where(scope).pluck(:marker) |
| 121 | + uuid = page_content.page_content_markers.where(scope).first.uuid | ||
| 121 | item[:field_options].select{|item| item[:attributes]['repeatItemId'] == repeat_id.to_s }.each do |marker| | 122 | item[:field_options].select{|item| item[:attributes]['repeatItemId'] == repeat_id.to_s }.each do |marker| |
| 122 | unless exist_markers.include?(marker[:name]) | 123 | unless exist_markers.include?(marker[:name]) |
| 123 | page_content.page_content_markers.create( | 124 | page_content.page_content_markers.create( |
| 125 | + uuid: uuid, | ||
| 124 | marker: marker[:name], | 126 | marker: marker[:name], |
| 125 | row_item: index, | 127 | row_item: index, |
| 126 | marker_name: marker[:itemName], | 128 | marker_name: marker[:itemName], |
| @@ -139,6 +141,7 @@ module Kanjai | @@ -139,6 +141,7 @@ module Kanjai | ||
| 139 | item[:conditions].select{|item| item[:repeat_id].to_s == repeat_id.to_s }.each do |marker| | 141 | item[:conditions].select{|item| item[:repeat_id].to_s == repeat_id.to_s }.each do |marker| |
| 140 | unless exist_markers.include?(marker[:id]) | 142 | unless exist_markers.include?(marker[:id]) |
| 141 | page_content.page_content_markers.create( | 143 | page_content.page_content_markers.create( |
| 144 | + uuid: uuid, | ||
| 142 | marker: marker[:id], | 145 | marker: marker[:id], |
| 143 | row_item: index, | 146 | row_item: index, |
| 144 | marker_name: marker[:name], | 147 | marker_name: marker[:name], |