Skip to content

Commit 4a65d77

Browse files
committed
simplify
1 parent 969305f commit 4a65d77

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

packages/web/src/initialize.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getOrgFromDomain } from './data/org';
77
import { SINGLE_TENANT_ORG_DOMAIN, SINGLE_TENANT_ORG_ID, SOURCEBOT_GUEST_USER_ID } from './lib/constants';
88
import { ServiceErrorException } from './lib/serviceError';
99
import { getOrgMetadata, isServiceError } from './lib/utils';
10-
import { clearSearchContexts, getSearchContexts } from './actions';
10+
import { clearSearchContexts } from './actions';
1111

1212
const logger = createLogger('web-initialize');
1313

@@ -67,10 +67,7 @@ const initSingleTenancy = async () => {
6767
// search contexts that may be present in the DB
6868
const hasSearchContextEntitlement = hasEntitlement("search-contexts")
6969
if(!hasSearchContextEntitlement) {
70-
const searchContexts = await getSearchContexts(SINGLE_TENANT_ORG_DOMAIN);
71-
if (!isServiceError(searchContexts) && searchContexts.length > 0) {
72-
clearSearchContexts(SINGLE_TENANT_ORG_DOMAIN)
73-
}
70+
clearSearchContexts(SINGLE_TENANT_ORG_DOMAIN)
7471
}
7572

7673
// Sync anonymous access config from the config file

0 commit comments

Comments
 (0)