Fix #704, allow delete without device_auth

* This typically comes up when using a deployment.yml generated from
   some inventory source, the device disappears and can then no
   longer be deleted since netdisco-delete unnecessarily insists on
   needing a valid device_auth
This commit is contained in:
Christian Ramseyer
2020-04-21 00:43:59 +02:00
parent 48996661ce
commit 4ae9b32973
2 changed files with 2 additions and 2 deletions

View File

@@ -76,7 +76,7 @@ register 'register_worker' => sub {
# per-device action but no device creds available
return $job->add_status( Status->info('skip: driver or action not applicable') )
if 0 == scalar @newuserconf;
if 0 == scalar @newuserconf && $job->action ne "delete";
}
# back up and restore device_auth

View File

@@ -51,7 +51,7 @@ sub run {
# per-device action but no device creds available
return $job->add_status( Status->defer('deferred job with no device creds') )
if 0 == scalar @newuserconf;
if 0 == scalar @newuserconf && $job->action ne "delete";
}
# back up and restore device_auth