diff --git a/app/models/page.rb b/app/models/page.rb index b9e06143..d98f3a4e 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -34,7 +34,7 @@ class Page < Item end def set_key - if title.new_record? + if title && title.new_record? title.key = 'title' end end diff --git a/lib/parsers/parser_back_end.rb b/lib/parsers/parser_back_end.rb index 12429247..24b6c59f 100644 --- a/lib/parsers/parser_back_end.rb +++ b/lib/parsers/parser_back_end.rb @@ -47,9 +47,9 @@ module ParserBackEnd ret << "'>" else part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil - ret << "