diff --git a/django/core/management/base.py b/django/core/management/base.py
index 5ac1cdf..9e2013e 100644
|
a
|
b
|
class BaseCommand(object):
|
| 371 | 371 | all_issues = checks.run_checks(app_configs=app_configs, tags=tags) |
| 372 | 372 | |
| 373 | 373 | msg = "" |
| | 374 | issue_count = 0 |
| | 375 | |
| 374 | 376 | if all_issues: |
| 375 | 377 | debugs = [e for e in all_issues if e.level < checks.INFO and not e.is_silenced()] |
| 376 | 378 | infos = [e for e in all_issues if checks.INFO <= e.level < checks.WARNING and not e.is_silenced()] |
| … |
… |
class BaseCommand(object):
|
| 387 | 389 | |
| 388 | 390 | for issues, group_name in sorted_issues: |
| 389 | 391 | if issues: |
| | 392 | issue_count += len(issues) |
| 390 | 393 | formatted = ( |
| 391 | 394 | color_style().ERROR(force_str(e)) |
| 392 | 395 | if e.is_serious() |
| … |
… |
class BaseCommand(object):
|
| 394 | 397 | for e in issues) |
| 395 | 398 | formatted = "\n".join(sorted(formatted)) |
| 396 | 399 | msg += '\n%s:\n%s\n' % (group_name, formatted) |
| 397 | | |
| 398 | | msg = "System check identified some issues:\n%s" % msg |
| | 400 | if msg: |
| | 401 | msg = "System check identified some issues:\n%s" % msg |
| 399 | 402 | |
| 400 | 403 | if display_num_errors: |
| 401 | 404 | if msg: |
| 402 | 405 | msg += '\n' |
| 403 | 406 | msg += "System check identified %s." % ( |
| 404 | | "no issues" if len(all_issues) == 0 else |
| 405 | | "1 issue" if len(all_issues) == 1 else |
| 406 | | "%s issues" % len(all_issues) |
| | 407 | "no issues" if issue_count == 0 else |
| | 408 | "1 issue" if issue_count == 1 else |
| | 409 | "%s issues" % issue_count |
| 407 | 410 | ) |
| 408 | 411 | |
| 409 | 412 | if any(e.is_serious() and not e.is_silenced() for e in all_issues): |
| 410 | 413 | raise CommandError(msg) |
| 411 | | elif msg and all_issues: |
| | 414 | elif msg and issue_count: |
| 412 | 415 | self.stderr.write(msg) |
| 413 | 416 | elif msg: |
| 414 | 417 | self.stdout.write(msg) |