Fix: Deleting an object via API does not disable it in DB IDO

fixes #11065
This commit is contained in:
Michael Friedrich 2016-02-05 12:37:00 +01:00 committed by Gunnar Beutner
parent 0dc6189f47
commit 7cbe1c46c9
1 changed files with 5 additions and 1 deletions

View File

@ -407,8 +407,12 @@ void DbConnection::UpdateObject(const ConfigObject::Ptr& object)
ActivateObject(dbobj);
dbobj->SendConfigUpdate();
dbobj->SendStatusUpdate();
} else if (!active && dbActive)
} else if (!active) {
/* Deactivate the deleted object no matter
* which state it had in the database.
*/
DeactivateObject(dbobj);
}
}
}