Commit 1b2429ca authored by Julien Muchembled's avatar Julien Muchembled

Fix detection of parameters of alarm scripts

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31668 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2cf40732
...@@ -304,11 +304,9 @@ class Alarm(XMLObject, PeriodicityMixin): ...@@ -304,11 +304,9 @@ class Alarm(XMLObject, PeriodicityMixin):
# We do some inspection to keep compatibility # We do some inspection to keep compatibility
# (because fixit and tag were not set previously) # (because fixit and tag were not set previously)
tag = str(self.portal_ids.generateNewLengthId(id_group=self.getId())) tag = str(self.portal_ids.generateNewLengthId(id_group=self.getId()))
kw = {} func_code = getattr(self, method_id).func_code
method = getattr(self, method_id) name_list = func_code.co_varnames[:func_code.co_argcount]
name_list = method.func_code.co_varnames if 'params' in name_list:
if 'params' in name_list or (method.func_defaults is not None
and len(method.func_defaults) < len(name_list)):
# New New API # New New API
getattr(self.activate(tag=tag), method_id)(fixit=fixit, tag=tag, params=params) getattr(self.activate(tag=tag), method_id)(fixit=fixit, tag=tag, params=params)
elif 'fixit' in name_list: elif 'fixit' in name_list:
......
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