Commit 3e7199b48519c695b4b99059f20782da7ce2630c
1 parent
ac868a02
check error update present condition elements names when upload new template
Showing
2 changed files
with
4 additions
and
3 deletions
| @@ -140,7 +140,8 @@ module Kanjai | @@ -140,7 +140,8 @@ module Kanjai | ||
| 140 | end | 140 | end |
| 141 | 141 | ||
| 142 | 142 | ||
| 143 | - item[:conditions].select{|item| item[:repeat_id].to_s == repeat_id.to_s }.each do |marker| | 143 | + item[:conditions].select{|item| item.symbolize_keys[:repeat_id].to_s == repeat_id.to_s }.each do |marker_hash| |
| 144 | + marker = marker_hash.symbolize_keys | ||
| 144 | unless exist_markers.include?(marker[:id]) | 145 | unless exist_markers.include?(marker[:id]) |
| 145 | page_content.page_content_markers.create( | 146 | page_content.page_content_markers.create( |
| 146 | uuid: uuid, | 147 | uuid: uuid, |
| @@ -153,7 +154,7 @@ module Kanjai | @@ -153,7 +154,7 @@ module Kanjai | ||
| 153 | condition: true | 154 | condition: true |
| 154 | ) | 155 | ) |
| 155 | end | 156 | end |
| 156 | - page_content.page_content_markers.where(scope).where(marker: marker[:name]).update_all(marker_name: marker[:itemName]) | 157 | + page_content.page_content_markers.where(scope).where(marker: marker[:id]).update_all(marker_name: marker[:name]) |
| 157 | 158 | ||
| 158 | end | 159 | end |
| 159 | 160 |