Skip to content

Commit 61f7625

Browse files
authored
Compute any new Workspace version from APP_VERSION (#10893)
# Introduction We want any new activated workspace to be filled with a version equal to the current `APP_VERSION` Please note that in a workspace lifecycle this operation will be run only once, discussed with @charlesBochet in front of `3 fois plus de piments` Going straightforward in this PR in order to release asap Started et will continue to implem new integrations regarding `SignUp` and `ActivateWorkspace` happy and expections path in https://github.com/twentyhq/twenty/tree/prastoin-new-workspace-has-version-integrations-tests
1 parent c371dd5 commit 61f7625

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.ts

+3
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,12 @@ export class WorkspaceService extends TypeOrmQueryService<Workspace> {
271271
});
272272
await this.userWorkspaceService.createWorkspaceMember(workspace.id, user);
273273

274+
const appVersion = this.environmentService.get('APP_VERSION') ?? null;
275+
274276
await this.workspaceRepository.update(workspace.id, {
275277
displayName: data.displayName,
276278
activationStatus: WorkspaceActivationStatus.ACTIVE,
279+
version: appVersion,
277280
});
278281

279282
return await this.workspaceRepository.findOneBy({

0 commit comments

Comments
 (0)