瀏覽代碼

Only inventory active devices

Jeremy Stretch 9 年之前
父節點
當前提交
ab17005c77
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      netbox/extras/management/commands/run_inventory.py

+ 2 - 1
netbox/extras/management/commands/run_inventory.py

@@ -37,7 +37,8 @@ class Command(BaseCommand):
         if options['password']:
             self.password = getpass("Password: ")
 
-        device_list = Device.objects.filter()
+        # Attempt to inventory only active devices
+        device_list = Device.objects.filter(status=True)
 
         # --site: Include only devices belonging to specified site(s)
         if options['site']: