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

Unified Diff: dashboard/dashboard/update_bug_with_results.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/models/alert_group_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/update_bug_with_results.py
diff --git a/dashboard/dashboard/update_bug_with_results.py b/dashboard/dashboard/update_bug_with_results.py
index 3eb7a935ac3391595eef65b840a86e34d2f9b1e2..673dcf32e785d5351256e89d67d422d35574c21d 100644
--- a/dashboard/dashboard/update_bug_with_results.py
+++ b/dashboard/dashboard/update_bug_with_results.py
@@ -21,6 +21,7 @@ from dashboard import quick_logger
from dashboard.common import datastore_hooks
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 bug_data
from dashboard.models import try_job
@@ -333,9 +334,9 @@ def _MapAnomaliesToMergeIntoBug(dest_bug_id, source_bug_id):
query = anomaly.Anomaly.query(
anomaly.Anomaly.bug_id == int(source_bug_id))
anomalies = query.fetch()
- for anomaly_entity in anomalies:
- anomaly_entity.bug_id = int(dest_bug_id)
- ndb.put_multi(anomalies)
+
+ alert_group.ModifyAlertsAndAssociatedGroups(
+ anomalies, bug_id=int(dest_bug_id))
def _GetCommitHashCacheKey(results_data):
« no previous file with comments | « dashboard/dashboard/models/alert_group_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698