From 5d03f2bc01fc08f57558cdd3b4fc08e6b379dad7 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Sun, 30 Jun 2019 01:35:48 +0200 Subject: Fixed #30595 -- Added error message when no objects found to sql* management commands. --- django/core/management/commands/sqlsequencereset.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'django/core/management/commands/sqlsequencereset.py') diff --git a/django/core/management/commands/sqlsequencereset.py b/django/core/management/commands/sqlsequencereset.py index d23f89ce1f..1d74ed9f55 100644 --- a/django/core/management/commands/sqlsequencereset.py +++ b/django/core/management/commands/sqlsequencereset.py @@ -20,4 +20,6 @@ class Command(AppCommand): connection = connections[options['database']] models = app_config.get_models(include_auto_created=True) statements = connection.ops.sequence_reset_sql(self.style, models) + if not statements and options['verbosity'] >= 1: + self.stderr.write('No sequences found.') return '\n'.join(statements) -- cgit v1.3