undefined m_coumt问题修正

This commit is contained in:
z9hang 2014-08-22 11:58:12 +08:00
parent b96a08a200
commit d1d2dd0e4b
1 changed files with 1 additions and 1 deletions

View File

@ -864,7 +864,7 @@ FROM `users` where id = #{user.id}")
users = Attachment.find_by_sql("SELECT COUNT(*) as m_count FROM #{Attachment.table_name} WHERE author_id = '#{user.id}' and container_type = 'Project' and container_id = #{project.id}") users = Attachment.find_by_sql("SELECT COUNT(*) as m_count FROM #{Attachment.table_name} WHERE author_id = '#{user.id}' and container_type = 'Project' and container_id = #{project.id}")
result = 0 result = 0
if users.count > 0 if users.count > 0
result = users.first.m_coumt result = users.first.m_count
end end
result result
end end