From ab17005c77fc328067825f0bce3b69404064fbdd Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 29 Apr 2016 12:28:10 -0400 Subject: [PATCH] Only inventory active devices --- netbox/extras/management/commands/run_inventory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netbox/extras/management/commands/run_inventory.py b/netbox/extras/management/commands/run_inventory.py index 1777ba0e5..7f2f62bc0 100644 --- a/netbox/extras/management/commands/run_inventory.py +++ b/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']: