[ews-app] Add method to fetch patch
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Feb 2019 00:02:23 +0000 (00:02 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Feb 2019 00:02:23 +0000 (00:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194518

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/models/patch.py:
(Patch.get_patch):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241326 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-app/ews/models/patch.py
Tools/ChangeLog

index b24267a..09607f8 100644 (file)
@@ -75,6 +75,13 @@ class Patch(models.Model):
         return Patch.is_existing_patch_id(patch_id) and Patch.objects.get(pk=patch_id).sent_to_buildbot
 
     @classmethod
+    def get_patch(cls, patch_id):
+        try:
+            return Patch.objects.get(patch_id=patch_id)
+        except:
+            return None
+
+    @classmethod
     def set_sent_to_buildbot(cls, patch_id):
         if not Patch.is_existing_patch_id(patch_id):
             return ERR_NON_EXISTING_PATCH
index 4c18814..31d7542 100644 (file)
@@ -1,3 +1,13 @@
+2019-02-12  Aakash Jain  <aakash_jain@apple.com>
+
+        [ews-app] Add method to fetch patch
+        https://bugs.webkit.org/show_bug.cgi?id=194518
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-app/ews/models/patch.py:
+        (Patch.get_patch):
+
 2019-02-12  Zalan Bujtas  <zalan@apple.com>
 
         [LFC] Expand tests coverage (60 new tests -> 860)