Use only site with issuer = true in import tasks
MODIFY
src/async-task/tasks/TagsImportAsyncTask.ts
src/async-task/tasks/TagsImportAsyncTask.ts
@@ -28,7 +28,7 @@ export default class TagsImportAsyncTask extends AbstractAsyncTask {
try {
// If we never got the sites from db -> construct array of existing sites
if (existingSites.size === 0) {
- const sites = await SiteStorage.getSites(tenant, {}, Constants.DB_PARAMS_MAX_LIMIT, ['id', 'name']);
+ const sites = await SiteStorage.getSites(tenant, { issuer: true }, Constants.DB_PARAMS_MAX_LIMIT, ['id', 'name']);
for (const site of sites.result) {
existingSites.set(site.id, site);
}

MODIFY
src/async-task/tasks/UsersImportAsyncTask.ts
src/async-task/tasks/UsersImportAsyncTask.ts
@@ -27,7 +27,7 @@ export default class UsersImportAsyncTask extends AbstractAsyncTask {
const tenant = await TenantStorage.getTenant(this.getAsyncTask().tenantID);
try {
if (existingSites.size === 0) {
- const sites = await SiteStorage.getSites(tenant, {}, Constants.DB_PARAMS_MAX_LIMIT, ['id', 'name']);
+ const sites = await SiteStorage.getSites(tenant, { issuer: true }, Constants.DB_PARAMS_MAX_LIMIT, ['id', 'name']);
for (const site of sites.result) {
existingSites.set(site.id, site);
}

Use only site with issuer = true in import tasks