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

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();
}
}
}