Creating key_value in inventory returns HTTP 500 error

Bug 837812