Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

Commit

Permalink
made some null checks #787
Browse files Browse the repository at this point in the history
  • Loading branch information
batamar committed May 23, 2020
1 parent 9acac8b commit 711e8ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/data/modules/fields/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const checkFieldNames = async (type: string, fields: string[]) => {

for (let fieldName of fields) {
if (!fieldName) {
return properties;
continue;
}

fieldName = fieldName.trim();
Expand Down Expand Up @@ -54,7 +54,7 @@ export const checkFieldNames = async (type: string, fields: string[]) => {
}

if (!property.type) {
throw new Error('Bad column name');
throw new Error(`Bad column name ${fieldName}`);
}

properties.push(property);
Expand Down
2 changes: 0 additions & 2 deletions src/workers/bulkInsert.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ connect().then(async () => {
const companies = await Companies.find({ primaryName: { $in: doc.companiesPrimaryNames } }, { _id: 1 });
const companyIds = companies.map(company => company._id);

console.log(doc.companiesPrimaryNames, companyIds);

for (const _id of companyIds) {
await Conformities.addConformity({
mainType: 'customer',
Expand Down

0 comments on commit 711e8ef

Please sign in to comment.