mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
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:
@@ -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')),
|
||||
|
||||
Reference in New Issue
Block a user