fix: fixed migration script bugs (#2718)

This commit is contained in:
Wyatt Johnson
2019-11-19 19:18:28 +00:00
committed by GitHub
parent fce7b08ca0
commit 3642c642d6
2 changed files with 11 additions and 3 deletions
@@ -32,7 +32,15 @@ function isOldSSOKey(key: SSOKey | OldSSOKey): key is OldSSOKey {
return false;
}
return true;
if ((key as OldSSOKey).deprecateAt) {
return true;
}
if ((key as OldSSOKey).deletedAt) {
return true;
}
return false;
}
interface OldTenant {
+2 -2
View File
@@ -261,7 +261,7 @@ export default class TenantCache {
/**
* onMessage is fired every time the client gets a subscription event.
*/
private async onMessage(channel: string, data: string): Promise<void> {
private onMessage = async (channel: string, data: string): Promise<void> => {
// Only do things when the message is for tenant.
if (channel !== TENANT_CACHE_CHANNEL) {
return;
@@ -299,7 +299,7 @@ export default class TenantCache {
"an error occurred while trying to handle a message"
);
}
}
};
public async retrieveByID(id: string): Promise<Readonly<Tenant> | null> {
return this.tenantsByID.load(id);