Commit 1db89fa8 by mingyuan

protect nil

parent 2b8f5704
......@@ -8,6 +8,7 @@ module Dingtalk
def sync_employee_code(mobile, app_key = nil)
app = SaasApp.find_by(app_key: app_key) || SaasApp.first
return unless app
info = app.api.get_employee_code(mobile)
self.employee_code = info['employeeCode']
self
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment