Commit 0f6118ad authored by Aurel's avatar Aurel

fix condition as we might get a list or a tuple

parent 0ddd63b9
......@@ -58,14 +58,14 @@
#context.log("Delivery_getMovementList", "portal_type = %s" %(portal_type,))\n
#context.log("Delivery_getMovementList", "len portal_type = %s" % (len(portal_type),))\n
if not same_type(portal_type, []):\n
if same_type(portal_type, ""):\n
return context.getMovementList(portal_type=portal_type)\n
if len(portal_type) != 2:\n
# use catalog\n
return context.getMovementList(portal_type=portal_type)\n
line_list = context.objectValues(portal_type=portal_type[0])\n
#context.log(\'line_list\', line_list)\n
invert = 0\n
if len(line_list) == 0:\n
# try with the second portal type\n
\ No newline at end of file
\ No newline at end of file
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