Commit d67e3cfb authored by Aurel's avatar Aurel

wrap long line & remove variable

parent 2d2c38f9
...@@ -69,15 +69,15 @@ class ERP5NodeConduit(TioSafeBaseConduit): ...@@ -69,15 +69,15 @@ class ERP5NodeConduit(TioSafeBaseConduit):
we can filter person based on the plugin they came from we can filter person based on the plugin they came from
""" """
site = self.getIntegrationSite(kw['domain']) site = self.getIntegrationSite(kw['domain'])
default_stc = site.getSourceTrade()
# try to find the corresponding STC # try to find the corresponding STC
stc_list = object.getPortalObject().sale_trade_condition_module.searchFolder(title="%s %s" %(site.getReference(), object.getTitle()), stc_list = object.getPortalObject().sale_trade_condition_module.searchFolder(
validation_state="validated" title="%s %s" %(site.getReference(), object.getTitle()),
) validation_state="validated")
if len(stc_list) == 0: if len(stc_list) == 0:
self._createSaleTradeCondition(object, **kw) self._createSaleTradeCondition(object, **kw)
elif len(stc_list) > 1: elif len(stc_list) > 1:
raise ValueError, "Multiple trade condition (%s) retrieve for %s" %([x.path for x in stc_list], object.getTitle()) raise ValueError, "Multiple trade condition (%s) retrieved for %s" \
% ([x.path for x in stc_list], object.getTitle())
else: else:
stc = stc_list[0].getObject() stc = stc_list[0].getObject()
stc.edit( stc.edit(
......
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