Issue on write the value of customized field into database

We have a custom script to fetch the leader’s Employee ID and write this ID into database.
The fetch process is working well but in database the value of that field (leader) always empty.
Can’t write to database is not 100%, we will see the value maybe one or 2 times but most of time yes they are null.

  refresh(frm){
    frappe.call({
      method: 'frappe.client.get_value',
      args:{
         doctype: 'Employee',
         filters:{
             'prefered_email': cur_frm.doc.owner
         },
         fieldname:['reports_to']
      },
      callback: function (r1) {
        if (cur_frm.doc.owner=='ABC@net-swift.com'){
            cur_frm.doc.leader='HR-EMP-00002';
        } else if (cur_frm.doc.owner=='XYZ@net-swift.com') {
            cur_frm.doc.leader='HR-EMP-00003';
        } else {
        cur_frm.doc.leader=r1.message.reports_to;
        }
      }
    });      
  },

frappe version: 12.16.3
erpnext version: 12.19.0

Thanks.