Fit issue 240 by using slug to find content-type
export.rb exports targets with field_attributes['target'] = target_klass._parent.slug but import imports it with: target_content_type = site.content_types.where(:name => association.target).first this fails if one uses capitalized names for Models. i changed the default.zip to contain a site yaml with capitalized Model-Names too.
This commit is contained in:
parent
a650acd535
commit
27dd3b2001
@ -189,7 +189,7 @@ module Locomotive
|
|||||||
content = content._parent.reload.contents.find(content._id) # target should be updated
|
content = content._parent.reload.contents.find(content._id) # target should be updated
|
||||||
|
|
||||||
associations.each do |association|
|
associations.each do |association|
|
||||||
target_content_type = site.content_types.where(:name => association.target).first
|
target_content_type = site.content_types.where(:slug => association.target).first
|
||||||
|
|
||||||
next if target_content_type.nil?
|
next if target_content_type.nil?
|
||||||
|
|
||||||
@ -240,4 +240,4 @@ module Locomotive
|
|||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
BIN
spec/fixtures/themes/default.zip
vendored
BIN
spec/fixtures/themes/default.zip
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user