Skip to content

Commit

Permalink
Merge pull request #822 from AdrianGaudebert/790845-fix-os-filter-in-…
Browse files Browse the repository at this point in the history
…daily-crashes

Fixes bug 790845 - Do not separate by OS or crash type when filtering.
  • Loading branch information
Schalk Neethling committed Sep 13, 2012
2 parents 51aa56e + 2f62162 commit 04b86ba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions socorro/external/postgresql/crashes.py
Expand Up @@ -235,18 +235,10 @@ def get_daily(self, **kwargs):
if params.os and params.os[0]:
sql_where.append("os_short_name IN %(os)s")
params.os = tuple(x[0:3].lower() for x in params.os)
if params.separated_by != "os":
db_fields.append("os_name")
db_group.append("os_name")
out_fields.append("os")

if params.report_type and params.report_type[0]:
sql_where.append("crash_type_short IN %(report_type)s")
params.report_type = tuple(params.report_type)
if params.separated_by != "report_type":
db_fields.append("crash_type")
db_group.append("crash_type")
out_fields.append("report_type")

sql_where = " AND ".join(sql_where)

Expand Down
6 changes: 0 additions & 6 deletions socorro/unittest/external/postgresql/test_crashes.py
Expand Up @@ -399,7 +399,6 @@ def test_get_daily(self):
"date": today,
"report_count": 5,
"report_type": "Browser",
"os": "Windows",
"adu": 200,
"crash_hadu": 25.0,
"throttle": 0.1
Expand All @@ -412,7 +411,6 @@ def test_get_daily(self):
"date": today,
"report_count": 5,
"report_type": "Hang",
"os": "Windows",
"adu": 200,
"crash_hadu": 25.0,
"throttle": 0.1
Expand All @@ -438,7 +436,6 @@ def test_get_daily(self):
"version": "13.0",
"date": today,
"report_count": 3,
"report_type": "Hang",
"adu": 30,
"crash_hadu": 100.0,
"throttle": 0.1
Expand All @@ -465,7 +462,6 @@ def test_get_daily(self):
"version": "11.0",
"date": today,
"report_count": 1,
"report_type": "Browser",
"adu": 10,
"crash_hadu": 100.0,
"throttle": 0.1
Expand All @@ -475,7 +471,6 @@ def test_get_daily(self):
"version": "11.0",
"date": yesterday,
"report_count": 2,
"report_type": "Browser",
"adu": 20,
"crash_hadu": 100.0,
"throttle": 0.1
Expand All @@ -487,7 +482,6 @@ def test_get_daily(self):
"version": "12.0",
"date": yesterday,
"report_count": 1,
"report_type": "Browser",
"adu": 10,
"crash_hadu": 100.0,
"throttle": 0.1
Expand Down

0 comments on commit 04b86ba

Please sign in to comment.