This should fix the sql craziness that was going on withe the media type enforcing.  Part of the problem came in where the initial sql was split to display the devices in the rack in the list first.  That added in the constraint that a cabinet exist in order for the device to be shown so that excluded all child devices.  I've added in some crazy case statements and made the sql uber complex but it has the intended effect now.  Test this shit then call it done. #300