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

Unified Diff: appengine/findit/model/wf_culprit.py

Issue 2116073002: [Findit] Fix redirect bug and update template for waterfall/culprit. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 6 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: appengine/findit/model/wf_culprit.py
diff --git a/appengine/findit/model/wf_culprit.py b/appengine/findit/model/wf_culprit.py
index f40882b5a3bd96388897eeafb5bc0db306017cee..00457aa686bbfa5932d3cb53ed3fcf62e8ea105a 100644
--- a/appengine/findit/model/wf_culprit.py
+++ b/appengine/findit/model/wf_culprit.py
@@ -19,6 +19,9 @@ class WfCulprit(ndb.Model):
# The Git hash revision of the culprit.
revision = ndb.StringProperty(indexed=False)
+ # The commit position of the culprit. Might not be available for some repo.
+ commit_position = ndb.IntegerProperty(indexed=False)
+
# When the code-review of this culprit was notified.
cr_notification_time = ndb.DateTimeProperty(indexed=True)
@@ -45,10 +48,11 @@ class WfCulprit(ndb.Model):
return ndb.Key(cls.__name__, '%s/%s' % (repo_name, revision))
@classmethod
- def Create(cls, repo_name, revision): # pragma: no cover
+ def Create(cls, repo_name, revision, commit_position): # pragma: no cover
instance = cls(key=cls._CreateKey(repo_name, revision))
instance.repo_name = repo_name
instance.revision = revision
+ instance.commit_position = commit_position
instance.builds = []
return instance

Powered by Google App Engine
This is Rietveld 408576698