Fix sign up broken because of missing workspace schema (#6013)
Allow workspace datasource factory to return null if the workspace schema has not been created yet
This commit is contained in:
@ -35,6 +35,11 @@ export class TwentyORMManager {
|
||||
entities,
|
||||
workspaceId,
|
||||
);
|
||||
|
||||
if (!workspaceDataSource) {
|
||||
throw new Error('Workspace data source not found');
|
||||
}
|
||||
|
||||
const entitySchema = this.entitySchemaFactory.create(entityClass);
|
||||
|
||||
return workspaceDataSource.getRepository<T>(entitySchema);
|
||||
|
||||
Reference in New Issue
Block a user