diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2009-12-22 14:37:40 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2009-12-22 14:37:40 +0000 |
| commit | 45b4288bb66a3cda401b45901e85b645674c3988 (patch) | |
| tree | 3594b06a5974a1bdcb79c6d22258d521d2493ce7 /django/core/management/commands/sqlsequencereset.py | |
| parent | 27c43c3acc1ca29ff3d380cd2b5722803648a5dd (diff) | |
[soc2009/multidb] Updated management commands to ensure that a database name is always available. Patch from Russell Keith-Magee.archive/soc2009/multidb
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/management/commands/sqlsequencereset.py')
| -rw-r--r-- | django/core/management/commands/sqlsequencereset.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/management/commands/sqlsequencereset.py b/django/core/management/commands/sqlsequencereset.py index f1d63c0e05..6aedcfb043 100644 --- a/django/core/management/commands/sqlsequencereset.py +++ b/django/core/management/commands/sqlsequencereset.py @@ -16,5 +16,5 @@ class Command(AppCommand): output_transaction = True def handle_app(self, app, **options): - connection = connections[options['database']] + connection = connections[options.get('database', DEFAULT_DB_ALIAS)] return u'\n'.join(connection.ops.sequence_reset_sql(self.style, models.get_models(app))).encode('utf-8') |
