Skip to content

Commit

Permalink
Add info message to help new admins who forgot to register a Licenses…
Browse files Browse the repository at this point in the history
… org.
  • Loading branch information
michaelhoefer committed Jan 21, 2022
1 parent 85df874 commit 747abfb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions worker/packagefetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ async function fetch(fetchAll, job) {
adminJob = job;

const licenseOrgs = await packageorgs.retrieveByType([sfdc.OrgTypes.Licenses]);
if (licenseOrgs.length === 0) {
adminJob.postMessage(`Note: no connected org of type Licenses were found. No package data will be fetched without at least one Licenses org connected.`);
return;
}

for (let i = 0; i < licenseOrgs.length; i++) {
const lmaOrgId = licenseOrgs[i].org_id;
Expand Down

0 comments on commit 747abfb

Please sign in to comment.