Permalink
Browse files

Fixes bug 850988 - Corrected the order of products in dropdowns.

  • Loading branch information...
1 parent b71a70e commit fdc1c54cd7bd4bbd9b4ce7a31c743d8f1e20022c @adngdb adngdb committed Apr 19, 2013
Showing with 9 additions and 5 deletions.
  1. +3 −2 crashstats/crashstats/models.py
  2. +6 −3 crashstats/crashstats/tests/test_models.py
View
5 crashstats/crashstats/models.py
@@ -270,11 +270,12 @@ def clean(string):
class CurrentVersions(SocorroMiddleware):
def get(self):
- products = CurrentProducts().get()['hits']
+ products = CurrentProducts().get()['products']
+ releases = CurrentProducts().get()['hits']
currentversions = []
for product_name in products:
- for release in products[product_name]:
+ for release in releases[product_name]:
currentversions.append(release)
return currentversions
View
9 crashstats/crashstats/tests/test_models.py
@@ -106,7 +106,8 @@ def mocked_get(**options):
"version": "2.1.3pre",
"release": "Beta",
"id": 922}]
- }
+ },
+ "products": ["Camino"]
}
""")
@@ -134,7 +135,8 @@ def mocked_get(**options):
"version": "2.1.3pre",
"release": "Beta",
"id": 922}]
- }
+ },
+ "products": ["WaterWolf"]
}
""")
@@ -884,7 +886,8 @@ def mocked_get(**options):
"version": "2.1.3pre",
"release": "Beta",
"id": 922}]
- }
+ },
+ "products": ["Camino"]
}
""")
rget.side_effect = mocked_get

0 comments on commit fdc1c54

Please sign in to comment.