mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-12 16:34:26 +02:00
DirectorDatafield: Properly cache category in getCategory()
Makes `getCategoryName()` work.
This commit is contained in:
parent
bf591093d8
commit
9919b65fc5
@ -74,7 +74,8 @@ class DirectorDatafield extends DbObjectWithSettings
|
|||||||
if ($this->category) {
|
if ($this->category) {
|
||||||
return $this->category;
|
return $this->category;
|
||||||
} elseif ($id = $this->get('category_id')) {
|
} elseif ($id = $this->get('category_id')) {
|
||||||
return DirectorDatafieldCategory::loadWithAutoIncId($id, $this->getConnection());
|
$this->category = DirectorDatafieldCategory::loadWithAutoIncId($id, $this->getConnection());
|
||||||
|
return $this->category;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user