Red Hat Bugzilla – Bug 841398
lazy_create does not handle DeviceClass(device_class=None)
Last modified: 2012-08-09 04:06:51 EDT
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
Beaker 0.9.2 has been released.