历史数据中当课程名称字段为空时从项目列表里获取名称
This commit is contained in:
parent
1e6693cdcf
commit
0e0b8fb8d8
|
@ -275,4 +275,7 @@ class Course < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def name
|
||||
read_attribute('name') || Project.find_by_identifier(self.extra).try(:name)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue