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

Unified Diff: dashboard/dashboard/models/table_config.py

Issue 2648683004: Building the table for speed releasing. (Closed)
Patch Set: Removing all traces of avg and Average Created 3 years, 11 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
Index: dashboard/dashboard/models/table_config.py
diff --git a/dashboard/dashboard/models/table_config.py b/dashboard/dashboard/models/table_config.py
index d609bc1f1d946b30759b3ff36dd6f681a7e8f3e9..edd6e6e247235ec59b37797303605544d576b451 100644
--- a/dashboard/dashboard/models/table_config.py
+++ b/dashboard/dashboard/models/table_config.py
@@ -31,6 +31,7 @@ import json
from google.appengine.ext import ndb
+from dashboard.common import utils
from dashboard.models import internal_only_model
@@ -96,6 +97,13 @@ def CreateTableConfig(name, bots, tests, layout, username):
error_message = '%s already exists.' % name
return None, error_message
+ for bot in bots:
+ for test in tests:
+ test_key = utils.TestMetadataKey(bot + '/' + test)
+ if not test_key.get():
+ error_message = '%s is not a valid test.' % test
+ return None, error_message
eakuefner 2017/01/28 00:22:17 It occurs to me that this pattern is kind of funky
jessimb 2017/01/30 19:23:10 Feels much cleaner! Note that I didn't use self.Re
+
# Input validates, create table now.
error_message = 'TableConfig created successfully.'
table_config = TableConfig(id=name, bots=valid_bots, tests=tests,

Powered by Google App Engine
This is Rietveld 408576698