diff --git a/lib/zenoss/jsonapi/device_router.rb b/lib/zenoss/jsonapi/device_router.rb index 3f047fe..e0d9a31 100644 --- a/lib/zenoss/jsonapi/device_router.rb +++ b/lib/zenoss/jsonapi/device_router.rb @@ -3,17 +3,17 @@ # # # This file is part of zenoss_client. -# +# # zenoss_client is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either version 3 of the License, or (at # your option) any later version. -# +# # zenoss_client is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. -# +# # You should have received a copy of the GNU General Public License along # with zenoss_client. If not, see . ############################################################################# @@ -44,7 +44,7 @@ def get_devices(uid = '/zport/dmd/Devices', opts = {}) resp = json_request('DeviceRouter', 'getDevices', [data]) devs = [] - resp['devices'].each do |dev| + resp['devices'] && resp['devices'].each do |dev| devs << Model::Device.new(self, dev) end devs