diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-03-22 18:09:22 +0000 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-03-22 18:09:22 +0000 |
| commit | ce7113ccbe5047baeb317c4b854ec119f8b5b460 (patch) | |
| tree | 4d684c43e7ab4c2f0d9a822cf7f55afdf7034f02 | |
| parent | e78d6b406bede7c021aaecf7ae2c8c893e0ea84a (diff) | |
Used SortedDict instead of dict to avoid random errors that may occur when dict randomization is enabled in Python. Refs #17758. Thanks Łukasz Rekucki.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17777 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/models/sql/query.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 693dde3b40..ce11716aba 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -100,7 +100,7 @@ class Query(object): def __init__(self, model, where=WhereNode): self.model = model - self.alias_refcount = {} + self.alias_refcount = SortedDict() self.alias_map = {} # Maps alias to join information self.table_map = {} # Maps table names to list of aliases. self.join_map = {} @@ -819,7 +819,7 @@ class Query(object): assert current < ord('Z') prefix = chr(current + 1) self.alias_prefix = prefix - change_map = {} + change_map = SortedDict() for pos, alias in enumerate(self.tables): if alias in exceptions: continue |
