Skip to content

Commit 0dd0b7e

Browse files
committed
Bugfix: cannot set other content "as default page" after first import
1 parent 5843168 commit 0dd0b7e

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

src/Observers/ContentObserver.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,6 @@ public function created($model)
4646
* @return void
4747
*/
4848
public function saving($model)
49-
{
50-
$this->clearCached();
51-
}
52-
53-
/**
54-
* @param Content&Model $model
55-
* @return void
56-
*/
57-
public function updating($model)
5849
{
5950
// Set "is_default" of other content as false if this model is changing to "default"
6051
if ($model->isDirty(['is_default']) && $model->is_default) {
@@ -64,6 +55,8 @@ public function updating($model)
6455
$item->save();
6556
});
6657
}
58+
59+
$this->clearCached();
6760
}
6861

6962
/**

0 commit comments

Comments
 (0)