Commit a06c15f8 authored by Łukasz Nowak's avatar Łukasz Nowak

Do not access objects.

This script is called with unprivilieged users and it does not need to access
objects (...in order to fetch uid), just use relative paths and blindly copy
values.
parent c921e581
......@@ -65,7 +65,7 @@ if trade_condition is not None:\n
if custom_trade_condition is None:\n
# If no trade condition or generic trade condition\n
# try to find existing trade condition\n
trade_condition_list = portal.sale_trade_condition_module.searchFolder(destination_section_uid=order.getDestinationSectionUid(),\n
trade_condition_list = portal.sale_trade_condition_module.searchFolder(destination_section_relative_url=order.getDestinationSectionRelativeUrl(),\n
validation_state="validated")\n
if len(trade_condition_list):\n
custom_trade_condition = trade_condition_list[0].getObject()\n
......@@ -75,7 +75,7 @@ if custom_trade_condition is None:\n
if trade_condition is None:\n
trade_condition = \'sale_trade_condition_module/vifib_trade_condition\'\n
custom_trade_condition = portal.sale_trade_condition_module.newContent(specialise_value=trade_condition,\n
destination_section_uid=order.getDestinationSectionUid(),\n
destination_section_relative_url=order.getDestinationSectionRelativeUrl(),\n
title="ViFiB Custom Conditions")\n
\n
if custom_trade_condition is None:\n
......
144
\ No newline at end of file
145
\ 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