

COLLECTION_CONTACTS = {
    u'Data Portal / Other': u'data@nhm.ac.uk',
    u'Algae, Fungi & Plants': u'm.carine@nhm.ac.uk',
    u'Economic & Environmental Earth Sciences': u'g.miller@nhm.ac.uk',
    u'Fossil Invertebrates & Plants': u'z.hughes@nhm.ac.uk@nhm.ac.uk',
    u'Fossil Vertebrates & Anthropology': u'm.richter@nhm.ac.uk',
    u'Insects': u'g.broad@nhm.ac.uk',
    u'Invertebrates': u'm.lowe@nhm.ac.uk',
    u'Library & Archives': u'library@nhm.ac.uk',
    u'Mineral & Planetary Sciences': u'm.rumsey@nhm.ac.uk',
    u'Vertebrates': u'simon.loader@nhm.ac.uk',
}

from collections import OrderedDict

# the order here matters as the default option should always be first in the dict so that it is
# automatically selected in combo boxes that use this list as a source for options
COLLECTION_CONTACTS = OrderedDict([
    (u'Data Portal / Other', u'data@nhm.ac.uk'),
    (u'Algae, Fungi & Plants', u'm.carine@nhm.ac.uk'),
    (u'Economic & Environmental Earth Sciences', u'g.miller@nhm.ac.uk'),
    (u'Fossil Invertebrates & Plants', u'z.hughes@nhm.ac.uk@nhm.ac.uk'),
    (u'Fossil Vertebrates & Anthropology', u'm.richter@nhm.ac.uk'),
    (u'Insects', u'g.broad@nhm.ac.uk'),
    (u'Invertebrates', u'm.lowe@nhm.ac.uk'),
    (u'Library & Archives', u'library@nhm.ac.uk'),
    (u'Mineral & Planetary Sciences', u'm.rumsey@nhm.ac.uk'),
    (u'Vertebrates', u'simon.loader@nhm.ac.uk'),
])

Use an OrderedDict to ensure the first option is the default option
Use an OrderedDict to ensure the first option is the default option

+ from collections import OrderedDict
  
+ # the order here matters as the default option should always be first in the dict so that it is
+ # automatically selected in combo boxes that use this list as a source for options
+ COLLECTION_CONTACTS = OrderedDict([
+     (u'Data Portal / Other', u'data@nhm.ac.uk'),
+     (u'Algae, Fungi & Plants', u'm.carine@nhm.ac.uk'),
+     (u'Economic & Environmental Earth Sciences', u'g.miller@nhm.ac.uk'),
+     (u'Fossil Invertebrates & Plants', u'z.hughes@nhm.ac.uk@nhm.ac.uk'),
+     (u'Fossil Vertebrates & Anthropology', u'm.richter@nhm.ac.uk'),
+     (u'Insects', u'g.broad@nhm.ac.uk'),
+     (u'Invertebrates', u'm.lowe@nhm.ac.uk'),
+     (u'Library & Archives', u'library@nhm.ac.uk'),
+     (u'Mineral & Planetary Sciences', u'm.rumsey@nhm.ac.uk'),
+     (u'Vertebrates', u'simon.loader@nhm.ac.uk'),
+ ])
  
- COLLECTION_CONTACTS = {
-     u'Data Portal / Other': u'data@nhm.ac.uk',
-     u'Algae, Fungi & Plants': u'm.carine@nhm.ac.uk',
-     u'Economic & Environmental Earth Sciences': u'g.miller@nhm.ac.uk',
-     u'Fossil Invertebrates & Plants': u'z.hughes@nhm.ac.uk@nhm.ac.uk',
-     u'Fossil Vertebrates & Anthropology': u'm.richter@nhm.ac.uk',
-     u'Insects': u'g.broad@nhm.ac.uk',
-     u'Invertebrates': u'm.lowe@nhm.ac.uk',
-     u'Library & Archives': u'library@nhm.ac.uk',
-     u'Mineral & Planetary Sciences': u'm.rumsey@nhm.ac.uk',
-     u'Vertebrates': u'simon.loader@nhm.ac.uk',
- }
- 
Use an OrderedDict to ensure the first option is the default option
## Code Before:


COLLECTION_CONTACTS = {
    u'Data Portal / Other': u'data@nhm.ac.uk',
    u'Algae, Fungi & Plants': u'm.carine@nhm.ac.uk',
    u'Economic & Environmental Earth Sciences': u'g.miller@nhm.ac.uk',
    u'Fossil Invertebrates & Plants': u'z.hughes@nhm.ac.uk@nhm.ac.uk',
    u'Fossil Vertebrates & Anthropology': u'm.richter@nhm.ac.uk',
    u'Insects': u'g.broad@nhm.ac.uk',
    u'Invertebrates': u'm.lowe@nhm.ac.uk',
    u'Library & Archives': u'library@nhm.ac.uk',
    u'Mineral & Planetary Sciences': u'm.rumsey@nhm.ac.uk',
    u'Vertebrates': u'simon.loader@nhm.ac.uk',
}

## Instruction:
Use an OrderedDict to ensure the first option is the default option
## Code After:
from collections import OrderedDict

# the order here matters as the default option should always be first in the dict so that it is
# automatically selected in combo boxes that use this list as a source for options
COLLECTION_CONTACTS = OrderedDict([
    (u'Data Portal / Other', u'data@nhm.ac.uk'),
    (u'Algae, Fungi & Plants', u'm.carine@nhm.ac.uk'),
    (u'Economic & Environmental Earth Sciences', u'g.miller@nhm.ac.uk'),
    (u'Fossil Invertebrates & Plants', u'z.hughes@nhm.ac.uk@nhm.ac.uk'),
    (u'Fossil Vertebrates & Anthropology', u'm.richter@nhm.ac.uk'),
    (u'Insects', u'g.broad@nhm.ac.uk'),
    (u'Invertebrates', u'm.lowe@nhm.ac.uk'),
    (u'Library & Archives', u'library@nhm.ac.uk'),
    (u'Mineral & Planetary Sciences', u'm.rumsey@nhm.ac.uk'),
    (u'Vertebrates', u'simon.loader@nhm.ac.uk'),
])
