Description of problem:
when calling the destroy method of a generic object (DRO), the object is removed from VMDB but not removed from the linked service.
The service.generic_objects array then have a nil entry wich cause th UI to crash when tryin to display the generic objects of this service.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create a dro instance:
dro_class = $evm.vmdb(:generic_object_definition).find_by(:name => "demo_dro")
dro = dro_class.create_object(:name => "First Demo DRO",
:is_tired => true,
:created => Time.new,
:retirement => nil)
2. link this object to a service
3. check the association returns an array with the dro
4. destroy the object
3. check the association returns an array without the dro
the svc.generic_object returns [nil]
the svc.generic_object returns 
Work-around is to remove the generic object from the service before deleting the object using the remove_from_service method.
Patrik - I can see two possible solutions here and both likely make sense to implement.
1. Remove the generic object from all services in a before_destroy callback.
2. Call ".compact" on the services "generic_object" relationship so any nil objects are removed from the return.
solved in PR: https://github.com/ManageIQ/manageiq/pull/17679
Verified in 220.127.116.11.20190115185124_c957ada.
The object was also removed from service once the generic object was destroyed .
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.