Commit e1513391 authored by Arnaud Fontaine's avatar Arnaud Fontaine

simulation: Migrate tested_property event if it's an empty tuple.

Followup of: "simulation: improve equivalence testers explanations messages".
parent 899b05c7
...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, interfaces ...@@ -32,6 +32,7 @@ from Products.ERP5Type import Permissions, interfaces
from Products.ERP5Type.DivergenceMessage import DivergenceMessage from Products.ERP5Type.DivergenceMessage import DivergenceMessage
from Products.ERP5Type.Message import Message from Products.ERP5Type.Message import Message
from Products.PythonScripts.standard import html_quote as h from Products.PythonScripts.standard import html_quote as h
from zLOG import LOG, WARNING
class EquivalenceTesterMixin: class EquivalenceTesterMixin:
""" """
...@@ -228,7 +229,16 @@ class EquivalenceTesterMixin: ...@@ -228,7 +229,16 @@ class EquivalenceTesterMixin:
if tested_property != None: if tested_property != None:
if isinstance(tested_property, tuple): if isinstance(tested_property, tuple):
if len(tested_property) == 1: if len(tested_property) == 1:
setattr(self, 'tested_property', tested_property[0]) new_value = tested_property[0]
else:
new_value = None
setattr(self, 'tested_property', new_value)
LOG("equivalence_tester", WARNING,
"%s: Migrated tested_property: %r => %r" % (self.getRelativeUrl(),
tested_property,
new_value))
return self._baseGetTestedProperty() return self._baseGetTestedProperty()
def getTestedPropertyList(self): def getTestedPropertyList(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment