修正新建项目页面默认LOGO显示问题

This commit is contained in:
wanglinchun 2013-08-07 17:14:24 +08:00
parent 05023c8451
commit be4dc216a9
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ module AvatarHelper
if source.nil?
return File.join(relative_path,'AnonymousUser','0')
end
if File.exist?(disk_filename(source.class,source.id))
if source.class && source.id && File.exist?(disk_filename(source.class,source.id))
avatar_image(source)
else
File.join(relative_path,avatar_directory(source.class),'0')