Commit 1a853fde authored by Michal Čihař's avatar Michal Čihař

Allow to process all checks as well

parent f14857e1
...@@ -33,11 +33,21 @@ class Command(BaseCommand): ...@@ -33,11 +33,21 @@ class Command(BaseCommand):
default=100, default=100,
help='Number of top checks to list', help='Number of top checks to list',
), ),
make_option(
'--all',
action='store_true',
dest='all',
default=False,
help='Process all checks (not only ignored)',
),
) )
def handle(self, *args, **options): def handle(self, *args, **options):
results = {} results = {}
checks = Check.objects.filter(ignore=True) if options['all']:
checks = Check.objects.all()
else:
checks = Check.objects.filter(ignore=True)
for check in checks: for check in checks:
units = check.get_related_units() units = check.get_related_units()
if not units.exists(): if not units.exists():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment