mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 22:13:32 -04:00
Use ZP custom school name field if available
This commit is contained in:
parent
fd0fdfe83e
commit
e834b93a0a
1 changed files with 3 additions and 2 deletions
|
@ -24,7 +24,6 @@ getZPContacts((err, emailContactMap) => {
|
|||
const tasks = [];
|
||||
for (const email in emailContactMap) {
|
||||
const contact = emailContactMap[email];
|
||||
// if (contact.organization !== 'Cabarrus County Schools') continue;
|
||||
tasks.push(createUpsertCloseLeadFn(contact));
|
||||
}
|
||||
async.parallel(tasks, (err, results) => {
|
||||
|
@ -147,8 +146,10 @@ function getZPContactsPage(contacts, searchQuery, done) {
|
|||
if (err) return done(err);
|
||||
const data = JSON.parse(body);
|
||||
for (let contact of data.contacts) {
|
||||
let organization = contact.organization_name;
|
||||
if (contact.custom_fields && contact.custom_fields.school_name) organization = contact.custom_fields.school_name;
|
||||
contacts.push({
|
||||
organization: contact.organization_name,
|
||||
organization: organization,
|
||||
name: contact.name,
|
||||
title: contact.title,
|
||||
email: contact.email,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue