Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: enable workspace upload avatar

DiamondThreee306408b5666
diff --git a/packages/data-center/src/provider/affine/affine.ts b/packages/data-center/src/provider/affine/affine.ts
index 01ff6b0a78..b061b1ce5a 100644
--- a/packages/data-center/src/provider/affine/affine.ts
+++ b/packages/data-center/src/provider/affine/affine.ts
@@ -397,7 +397,6 @@ export class AffineProvider extends BaseProvider {
provider: this.id,
syncMode: 'core',
});
-
await migrateBlobDB(workspaceUnit.id, id);
const blocksuiteWorkspace = createBlocksuiteWorkspace(id);
diff --git a/packages/data-center/src/provider/affine/utils.ts b/packages/data-center/src/provider/affine/utils.ts
index 54931fe9de..79da384dd5 100644
--- a/packages/data-center/src/provider/affine/utils.ts
+++ b/packages/data-center/src/provider/affine/utils.ts
@@ -66,7 +66,7 @@ export const migrateBlobDB = async (
newWorkspaceId: string
) => {
const oldDB = getDatabase('blob', oldWorkspaceId);
- const oldPendingDB = getDatabase<PendingTask>('pending', newWorkspaceId);
+ const oldPendingDB = getDatabase<PendingTask>('pending', oldWorkspaceId);
const newDB = getDatabase('blob', newWorkspaceId);
const newPendingDB = getDatabase<PendingTask>('pending', newWorkspaceId);
@@ -82,6 +82,6 @@ export const migrateBlobDB = async (
return [id, { id, blob }] as [string, PendingTask];
});
await newPendingDB.setMany(pendingEntries);
- await oldDB.clear();
- await oldPendingDB.clear();
+ oldDB.clear();
+ oldPendingDB.clear();
};