mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +01:00
Importer can restore deleted genres if needed
This commit is contained in:
parent
b89a0344d4
commit
1f74636a39
1 changed files with 4 additions and 1 deletions
|
@ -208,8 +208,11 @@ class ImportPonify extends Command
|
|||
$this->info('Genre: '.$genreName);
|
||||
|
||||
if ($genreName) {
|
||||
$genre = Genre::where('name', '=', $genreName)->first();
|
||||
$genre = Genre::withTrashed()->where('name', '=', $genreName)->first();
|
||||
if ($genre) {
|
||||
if ($genre->deleted_at == null) {
|
||||
$genre->restore();
|
||||
}
|
||||
$genreId = $genre->id;
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue