mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaObject: do not fail when rendering objects...
...without imports support fixes #12618
This commit is contained in:
parent
1a2cede13f
commit
c1afda4392
@ -1412,13 +1412,22 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
return $this->zone;
|
||||
}
|
||||
|
||||
try {
|
||||
if ($zoneId = $this->getResolvedProperty('zone_id')) {
|
||||
// Config has a lookup cache, is faster:
|
||||
return $config->getZoneName($zoneId);
|
||||
if ($this->hasProperty('zone_id')) {
|
||||
if (! $this->supportsImports()) {
|
||||
if ($zoneId = $this->zone_id) {
|
||||
// Config has a lookup cache, is faster:
|
||||
return $config->getZoneName($zoneId);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if ($zoneId = $this->getResolvedProperty('zone_id')) {
|
||||
// Config has a lookup cache, is faster:
|
||||
return $config->getZoneName($zoneId);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
return self::RESOLVE_ERROR;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
return self::RESOLVE_ERROR;
|
||||
}
|
||||
|
||||
if ($this->prefersGlobalZone()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user