Some photo management fixes

This commit is contained in:
Deon George
2019-12-15 21:08:33 +11:00
parent af1164e764
commit 149c7dcc53
2 changed files with 13 additions and 7 deletions

View File

@@ -115,14 +115,17 @@ abstract class Catalog extends Model
{
$result = '';
if ($this->software->model->make)
$result .= $this->software->model->make->name;
if ($this->software_id) {
if ($this->software->model_id) {
if ($this->software->model->make_id) {
$result .= $this->software->model->make->name;
}
if ($this->software->model)
$result .= ($result ? ' ' : '').$this->software->model->name;
$result .= ($result ? ' ' : '').$this->software->model->name;
}
if ($this->software)
$result .= ($result ? ' ' : '').$this->software->name;
}
return $result;
}