summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r--django/utils/datastructures.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index ffdc73f922..ee156b11d0 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -60,7 +60,10 @@ class SortedDict(dict):
if isinstance(data, dict):
self.keyOrder = data.keys()
else:
- self.keyOrder = [key for key, value in data]
+ self.keyOrder = []
+ for key, value in data:
+ if key not in self.keyOrder:
+ self.keyOrder.append(key)
def __deepcopy__(self, memo):
from copy import deepcopy