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:
@ -46,6 +46,15 @@ export class DataSourceService {
|
||||
});
|
||||
}
|
||||
|
||||
async getLastDataSourceMetadataFromWorkspaceId(
|
||||
workspaceId: string,
|
||||
): Promise<DataSourceEntity | null> {
|
||||
return this.dataSourceMetadataRepository.findOne({
|
||||
where: { workspaceId },
|
||||
order: { createdAt: 'DESC' },
|
||||
});
|
||||
}
|
||||
|
||||
async getLastDataSourceMetadataFromWorkspaceIdOrFail(
|
||||
workspaceId: string,
|
||||
): Promise<DataSourceEntity> {
|
||||
|
||||
Reference in New Issue
Block a user