File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -166,9 +166,9 @@ def report_host(opts)
166
166
end
167
167
168
168
if opts [ :comm ] and opts [ :comm ] . length > 0
169
- host = wspace . hosts . find_or_initialize_by_address_and_comm ( addr , opts [ :comm ] )
169
+ host = wspace . hosts . where ( address : addr , comm : opts [ :comm ] ) . first_or_initialize
170
170
else
171
- host = wspace . hosts . find_or_initialize_by_address ( addr )
171
+ host = wspace . hosts . where ( address : addr ) . first_or_initialize
172
172
end
173
173
else
174
174
host = addr
@@ -257,9 +257,9 @@ def update_host_via_sysinfo(opts)
257
257
end
258
258
259
259
if opts [ :comm ] and opts [ :comm ] . length > 0
260
- host = wspace . hosts . find_or_initialize_by_address_and_comm ( addr , opts [ :comm ] )
260
+ host = wspace . hosts . where ( address : addr , comm : opts [ :comm ] ) . first_or_initialize
261
261
else
262
- host = wspace . hosts . find_or_initialize_by_address ( addr )
262
+ host = wspace . hosts . where ( address : addr ) . first_or_initialize
263
263
end
264
264
else
265
265
host = addr
You can’t perform that action at this time.
0 commit comments