Chromium Code Reviews| Index: appengine/sheriff_o_matic/alerts_history.py |
| diff --git a/appengine/sheriff_o_matic/alerts_history.py b/appengine/sheriff_o_matic/alerts_history.py |
| index 2d03fa96fd72eec98afa6f1fa986103d34090bcc..270cb75b6b42ab2e0e9d34dcfa181cf6fa6067f7 100644 |
| --- a/appengine/sheriff_o_matic/alerts_history.py |
| +++ b/appengine/sheriff_o_matic/alerts_history.py |
| @@ -6,6 +6,7 @@ from alerts import AlertsHandler |
| from alerts import AlertsJSON |
| from internal_alerts import InternalAlertsHandler |
| import json |
| +import utils |
| import webapp2 |
| from google.appengine.api import users |
| @@ -16,7 +17,6 @@ from google.appengine.ext import ndb |
| class AlertsHistory(webapp2.RequestHandler): |
| MAX_LIMIT_PER_PAGE = 100 |
| PUBLIC_TYPE = AlertsHandler.ALERT_TYPE |
| - PRIVATE_TYPE = InternalAlertsHandler.ALERT_TYPE |
| def get_entry(self, query, key): |
| try: |
| @@ -59,6 +59,7 @@ class AlertsHistory(webapp2.RequestHandler): |
| } |
| def get(self, key=None): |
| + utils.increment_monarch('alerts-history') |
| query = AlertsJSON.query().order(-AlertsJSON.date) |
| result_json = {} |
| @@ -68,9 +69,6 @@ class AlertsHistory(webapp2.RequestHandler): |
| # Return only public alerts for non-internal users. |
| if not user or not user.email().endswith('@google.com'): |
| query = query.filter(AlertsJSON.type == self.PUBLIC_TYPE) |
| - else: |
|
agable
2015/08/12 22:18:08
Keep cleanup changes like this in a separate, quic
jshu
2015/08/14 20:47:56
so this actually fixes a bug that I created I refa
|
| - query = query.filter(AlertsJSON.type.IN([self.PUBLIC_TYPE, |
| - self.PRIVATE_TYPE])) |
| if key: |
| result_json.update(self.get_entry(query, key)) |