Fix parser common to skip not found module_app

Do not show default widget if there's no data
This commit is contained in:
chris committed 2013-10-08 16:42:20 +08:00
1 parent cce68beff1
commit 315a24556c
2 files changed
+10 -9

No files matched your search

+2 -2
View File
@@ -286,8 +286,8 @@ module ParserCommon
when 'default_widget'
"/panel/orbit_app/widget/#{part.widget_style}?inner=true"
else
raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil?
"/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true"
# raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil?
"/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" rescue ''
end
categories_str=(!part[:category].blank? ? part[:category] : category).collect{|t| "category_id[]=#{t}"}.join('&')