diff options
| author | Jason Pellerin <jpellerin@gmail.com> | 2006-09-14 03:40:45 +0000 |
|---|---|---|
| committer | Jason Pellerin <jpellerin@gmail.com> | 2006-09-14 03:40:45 +0000 |
| commit | 432070d0fbf20b800e667012fd220ae26e3f579f (patch) | |
| tree | f3529e66cb391569ea7bcd9cee7baed798fc9415 | |
| parent | eb1357bf48a65c9fe49b3d23df91e6ff2307e684 (diff) | |
[multi-db] Fixed scoping bug that caused pending statements to execute too soon in install.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3757 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/management.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management.py b/django/core/management.py index 2404a1d404..9630eaf6bb 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -408,8 +408,8 @@ def _install(app, commit=True, initial_data=True): if not model in models_installed: new_pending = manager.install(initial_data=initial_data) created_models.append(model) - for model, statements in new_pending.items(): - pending.setdefault(model, []).extend(statements) + for dep_model, statements in new_pending.items(): + pending.setdefault(dep_model, []).extend(statements) # Execute any pending statements that were waiting for this model if model in pending: for statement in pending.pop(model): |
