fix project
This commit is contained in:
parent
553e3b885e
commit
c730e2547e
@ -67,14 +67,17 @@ class Project extends \common\models\Project
|
|||||||
|
|
||||||
ProjectUser::deleteAll(['project_id' => $this->id]);
|
ProjectUser::deleteAll(['project_id' => $this->id]);
|
||||||
|
|
||||||
foreach ($post['user'] as $item) {
|
if($post['user']){
|
||||||
$prUser = new ProjectUser();
|
foreach ($post['user'] as $item) {
|
||||||
$prUser->project_id = $this->id;
|
$prUser = new ProjectUser();
|
||||||
$prUser->card_id = $item;
|
$prUser->project_id = $this->id;
|
||||||
|
$prUser->card_id = $item;
|
||||||
|
|
||||||
$prUser->save();
|
$prUser->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
parent::afterSave($insert, $changedAttributes); // TODO: Change the autogenerated stub
|
parent::afterSave($insert, $changedAttributes); // TODO: Change the autogenerated stub
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user