Clean up the code a bit

refs #11423
This commit is contained in:
Gunnar Beutner 2016-08-13 21:43:59 +02:00
parent c7af804cfd
commit 9f8cb8dd36
1 changed files with 1 additions and 6 deletions

View File

@ -200,12 +200,7 @@ bool Downtime::IsExpired(void) const
bool Downtime::HasValidConfigOwner(void) const
{
String configOwner = GetConfigOwner();
if (!configOwner.IsEmpty()) {
return (GetObject("ScheduledDowntime", configOwner) != ScheduledDowntime::Ptr());
}
return true;
return configOwner.IsEmpty() || GetObject<ScheduledDowntime>(configOwner);
}
int Downtime::GetNextDowntimeID(void)