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

Unified Diff: dashboard/dashboard/update_bug_with_results.py

Issue 2670003006: Revert of Dashboard - Remove pre-hook logic from alert.py. (Closed)
Patch Set: 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 673dcf32e785d5351256e89d67d422d35574c21d..3eb7a935ac3391595eef65b840a86e34d2f9b1e2 100644
--- a/dashboard/dashboard/update_bug_with_results.py
+++ b/dashboard/dashboard/update_bug_with_results.py
@@ -21,7 +21,6 @@
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
@@ -334,9 +333,9 @@
query = anomaly.Anomaly.query(
anomaly.Anomaly.bug_id == int(source_bug_id))
anomalies = query.fetch()
-
- alert_group.ModifyAlertsAndAssociatedGroups(
- anomalies, bug_id=int(dest_bug_id))
+ for anomaly_entity in anomalies:
+ anomaly_entity.bug_id = int(dest_bug_id)
+ ndb.put_multi(anomalies)
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