Update teamInternalId when updating project team
This is important because when an organization is deleted, projects are fetched by the teamInternalId and if the teamInternalId is not updated when the project team is updated, the project will be deleted if the previous organization is deleted.
This commit is contained in:
parent
6f39c1ddc9
commit
3bb22c38cc
1 changed files with 1 additions and 0 deletions
|
@ -483,6 +483,7 @@ App::patch('/v1/projects/:projectId/team')
|
|||
|
||||
$project = $dbForConsole->updateDocument('projects', $project->getId(), $project
|
||||
->setAttribute('teamId', $teamId)
|
||||
->setAttribute('teamInternalId', $team->getInternalId())
|
||||
->setAttribute('$permissions', [
|
||||
Permission::read(Role::team(ID::custom($teamId))),
|
||||
Permission::update(Role::team(ID::custom($teamId), 'owner')),
|
||||
|
|
Loading…
Reference in a new issue