Fixed another issue when updating albums during the update routine

This commit is contained in:
Andy Heathershaw 2017-04-18 20:31:16 +01:00
parent fb184714d6
commit a58fc32e43
1 changed files with 14 additions and 0 deletions

View File

@ -19,4 +19,18 @@ class AlbumObserver
$album->generateUrlPath();
}
}
public function updating(Album $album)
{
// Re-generate the alias and path
if (is_null($album->url_alias))
{
$album->generateAlias();
}
if (is_null($album->url_path))
{
$album->generateUrlPath();
}
}
}