fix renumber when running at cli

This commit is contained in:
Oliver Gorwits
2018-02-10 23:14:31 +00:00
parent 6bc86cc406
commit 147c02a956

View File

@@ -81,7 +81,7 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub {
# is not done in renumber but required otherwise confusing at job end! # is not done in renumber but required otherwise confusing at job end!
schema('netdisco')->resultset('Admin') schema('netdisco')->resultset('Admin')
->find({job => $job->id})->update({device => $new_ip}); ->find({job => $job->id})->update({device => $new_ip}) if $job->id;
return Status->info(sprintf ' [%s] device - changed IP to %s (%s)', return Status->info(sprintf ' [%s] device - changed IP to %s (%s)',
$old_ip, $device->ip, ($device->dns || '')); $old_ip, $device->ip, ($device->dns || ''));