DeviceClass' constructor turns an argument of device_class=None into the string "NONE". When lazy_create attempts to insert this, an IntegrityError is raised and it fails as it should... However, the subsequent attempt to fetch the existing row fails because it is filtering on device_class=None rather than device_class="NONE". This breaks the inventory script, which attempts to push several devices of type None. One solution might be to give DeviceClass its own lazy_create to handle this special case, as was done for Distro.
On Gerrit: http://gerrit.beaker-project.org/1248
https://beaker-stage.app.eng.bos.redhat.com/jobs/16554
Beaker 0.9.2 has been released.