Updated import data controller to check for blank user_id

This commit is contained in:
saurabhbhatia 2013-09-11 10:38:56 +08:00
parent d2a07d9ffb
commit e4514a353a
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,8 @@ class Admin::ImportDataController < OrbitBackendController
@teacher.user_id = hash['teacher_en']
elsif hash['teacher_en'].blank?
@teacher.user_id = hash['teacher_zh_tw']
else
@teacher.user_id = "Please Enter a User Name"
end
@teacher.save!
end