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

Unified Diff: dashboard/dashboard/file_bug.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 | « dashboard/dashboard/edit_anomalies.py ('k') | dashboard/dashboard/models/alert.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/file_bug.py
diff --git a/dashboard/dashboard/file_bug.py b/dashboard/dashboard/file_bug.py
index cc30ad9641c1c5ba24b94cff0df55cbe091d29df..b95ef75cabd21ee81e78ee6cd2ae14c09a67b8b5 100644
--- a/dashboard/dashboard/file_bug.py
+++ b/dashboard/dashboard/file_bug.py
@@ -17,6 +17,7 @@ from dashboard import oauth2_decorator
from dashboard.common import request_handler
from dashboard.common import utils
from dashboard.models import alert
+from dashboard.models import alert_group
from dashboard.models import bug_data
from dashboard.models import bug_label_patterns
from dashboard.services import issue_tracker_service
@@ -142,9 +143,8 @@ class FileBugHandler(request_handler.RequestHandler):
return
bug_data.Bug(id=bug_id).put()
- for alert_entity in alerts:
- alert_entity.bug_id = bug_id
- ndb.put_multi(alerts)
+
+ alert_group.ModifyAlertsAndAssociatedGroups(alerts, bug_id=bug_id)
comment_body = _AdditionalDetails(bug_id, alerts)
service.AddBugComment(bug_id, comment_body)
« no previous file with comments | « dashboard/dashboard/edit_anomalies.py ('k') | dashboard/dashboard/models/alert.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698