From e1cec59e25a97d3719e73a3f1719560b16c000dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Fri, 3 Nov 2017 11:36:13 +0100
Subject: [PATCH] [taskdistribution] Make node_title optional

createTestResult is called also without node_title, and it shall allow
execution in such case.
---
 product/ERP5/Document/ERP5ProjectUnitTestDistributor.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Document/ERP5ProjectUnitTestDistributor.py b/product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
index 9f5aecf037..0577f71512 100644
--- a/product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
+++ b/product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
@@ -392,8 +392,9 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
     """
     LOG('ERP5ProjectUnitTestDistributor.createTestResult', 0, (node_title, test_title))
     portal = self.getPortalObject()
-    test_node = self._getTestNodeFromTitle(node_title)
-    test_node.setPingDate()
+    if node_title:
+      test_node = self._getTestNodeFromTitle(node_title)
+      test_node.setPingDate()
     test_suite = self._getTestSuiteFromTitle(test_title)
     if test_suite is not None:
       test_suite.setPingDate()
-- 
2.30.9