Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1296)

Unified Diff: dashboard/dashboard/associate_alerts.py

Issue 2650683007: Dashboard - Remove pre-hook logic from alert.py. (Closed)
Patch Set: Fix race in delete. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dashboard/dashboard/edit_anomalies.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/associate_alerts.py
diff --git a/dashboard/dashboard/associate_alerts.py b/dashboard/dashboard/associate_alerts.py
index d7842a8c57b4b5bb937af1de9d647ee44e6dca65..5f2948be0cd979e4c4ec6468e9ab8fdc415be319 100644
--- a/dashboard/dashboard/associate_alerts.py
+++ b/dashboard/dashboard/associate_alerts.py
@@ -12,6 +12,7 @@ from google.appengine.ext import ndb
from dashboard import oauth2_decorator
from dashboard.common import request_handler
from dashboard.common import utils
+from dashboard.models import alert_group
from dashboard.models import anomaly
from dashboard.models import stoppage_alert
from dashboard.services import issue_tracker_service
@@ -125,9 +126,7 @@ class AssociateAlertsHandler(request_handler.RequestHandler):
})
return
- for a in alert_entities:
- a.bug_id = bug_id
- ndb.put_multi(alert_entities)
+ alert_group.ModifyAlertsAndAssociatedGroups(alert_entities, bug_id=bug_id)
self.RenderHtml('bug_result.html', {'bug_id': bug_id})
« no previous file with comments | « no previous file | dashboard/dashboard/edit_anomalies.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698