mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
parent
1d5caee2d9
commit
e8b4bf9d72
@ -1111,6 +1111,10 @@ class RelationController extends ControllerBehavior
|
||||
{
|
||||
$this->beforeAjax();
|
||||
|
||||
/*
|
||||
* If the pivot model fails for some reason, abort the sync
|
||||
*/
|
||||
Db::transaction(function () {
|
||||
/*
|
||||
* Add the checked IDs to the pivot table
|
||||
*/
|
||||
@ -1130,6 +1134,7 @@ class RelationController extends ControllerBehavior
|
||||
$modelToSave->save();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return ['#'.$this->relationGetId('view') => $this->relationRenderView()];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user