mirror of
https://github.com/humhub/humhub.git
synced 2025-02-22 18:22:43 +01:00
Fix saving a group without Default Space
This commit is contained in:
parent
6ad04a2bd4
commit
45c3fa5999
@ -52,10 +52,12 @@ class EditGroupForm extends Group
|
||||
|
||||
$existingSpaceIds = GroupSpace::find()->where(['group_id' => $this->id])->select('space_id')->column();
|
||||
$newSpaceIds = [];
|
||||
foreach ($this->defaultSpaceGuid as $spaceGuid) {
|
||||
$space = Space::findOne(['guid' => $spaceGuid]);
|
||||
if ($space !== null) {
|
||||
$newSpaceIds[] = $space->id;
|
||||
if (is_array($this->defaultSpaceGuid)) {
|
||||
foreach ($this->defaultSpaceGuid as $spaceGuid) {
|
||||
$space = Space::findOne(['guid' => $spaceGuid]);
|
||||
if ($space !== null) {
|
||||
$newSpaceIds[] = $space->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user