fix project

This commit is contained in:
Kavalar 2018-11-23 16:20:49 +03:00
parent 553e3b885e
commit c730e2547e

View File

@ -67,6 +67,7 @@ class Project extends \common\models\Project
ProjectUser::deleteAll(['project_id' => $this->id]); ProjectUser::deleteAll(['project_id' => $this->id]);
if($post['user']){
foreach ($post['user'] as $item) { foreach ($post['user'] as $item) {
$prUser = new ProjectUser(); $prUser = new ProjectUser();
$prUser->project_id = $this->id; $prUser->project_id = $this->id;
@ -74,6 +75,8 @@ class Project extends \common\models\Project
$prUser->save(); $prUser->save();
} }
}
parent::afterSave($insert, $changedAttributes); // TODO: Change the autogenerated stub parent::afterSave($insert, $changedAttributes); // TODO: Change the autogenerated stub
} }