[ews-app] Gracefully handle the case when state_string is None
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Mar 2019 21:44:35 +0000 (21:44 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Mar 2019 21:44:35 +0000 (21:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195753

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/models/build.py:
* BuildSlaveSupport/ews-app/ews/models/step.py:

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

Tools/BuildSlaveSupport/ews-app/ews/models/build.py
Tools/BuildSlaveSupport/ews-app/ews/models/step.py
Tools/ChangeLog

index 0a310e1..9e68c6f 100644 (file)
@@ -55,6 +55,9 @@ class Build(models.Model):
         if not Build.is_valid_result(patch_id, build_id, builder_id, number, result, state_string, started_at, complete_at):
             return ERR_UNEXPECTED
 
+        if state_string is None:
+            state_string = ''
+
         uid = BuildbotInstance.get_uid(hostname, build_id)
         build = Build.get_existing_build(uid)
         if build:
index 9b380ac..bfe584d 100644 (file)
@@ -51,6 +51,9 @@ class Step(models.Model):
         if not Step.is_valid_result(step_id, build_id, result, state_string, started_at, complete_at):
             return ERR_UNEXPECTED
 
+        if state_string is None:
+            state_string = ''
+
         step_uid = BuildbotInstance.get_uid(hostname, step_id)
         build_uid = BuildbotInstance.get_uid(hostname, build_id)
 
index 4d762bb..b42a417 100644 (file)
@@ -1,5 +1,15 @@
 2019-03-14  Aakash Jain  <aakash_jain@apple.com>
 
+        [ews-app] Gracefully handle the case when state_string is None
+        https://bugs.webkit.org/show_bug.cgi?id=195753
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-app/ews/models/build.py:
+        * BuildSlaveSupport/ews-app/ews/models/step.py:
+
+2019-03-14  Aakash Jain  <aakash_jain@apple.com>
+
         [ews-app] Status bubble display pending for currently running build step
         https://bugs.webkit.org/show_bug.cgi?id=195744