Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #324 from AdrianGaudebert/850988-products-order

Fixes bug 850988 - Corrected the order of products in dropdowns.
  • Loading branch information...
commit 2b17e506e49b2b85df9d5b1b03870f0cd4c2bd02 2 parents b71a70e + fdc1c54
brandonsavage brandonsavage authored
5 crashstats/crashstats/models.py
@@ -270,11 +270,12 @@ def clean(string):
270 270 class CurrentVersions(SocorroMiddleware):
271 271
272 272 def get(self):
273   - products = CurrentProducts().get()['hits']
  273 + products = CurrentProducts().get()['products']
  274 + releases = CurrentProducts().get()['hits']
274 275 currentversions = []
275 276
276 277 for product_name in products:
277   - for release in products[product_name]:
  278 + for release in releases[product_name]:
278 279 currentversions.append(release)
279 280
280 281 return currentversions
9 crashstats/crashstats/tests/test_models.py
@@ -106,7 +106,8 @@ def mocked_get(**options):
106 106 "version": "2.1.3pre",
107 107 "release": "Beta",
108 108 "id": 922}]
109   - }
  109 + },
  110 + "products": ["Camino"]
110 111 }
111 112 """)
112 113
@@ -134,7 +135,8 @@ def mocked_get(**options):
134 135 "version": "2.1.3pre",
135 136 "release": "Beta",
136 137 "id": 922}]
137   - }
  138 + },
  139 + "products": ["WaterWolf"]
138 140 }
139 141 """)
140 142
@@ -884,7 +886,8 @@ def mocked_get(**options):
884 886 "version": "2.1.3pre",
885 887 "release": "Beta",
886 888 "id": 922}]
887   - }
  889 + },
  890 + "products": ["Camino"]
888 891 }
889 892 """)
890 893 rget.side_effect = mocked_get

0 comments on commit 2b17e50

Please sign in to comment.
Something went wrong with that request. Please try again.