Commit 9973a674 authored by Ivan Tyagov's avatar Ivan Tyagov

Attach to context only if not already attached.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33032 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2257d098
...@@ -116,8 +116,10 @@ else:\n ...@@ -116,8 +116,10 @@ else:\n
if attach_document_to_context:\n if attach_document_to_context:\n
# attach document to current context using follow_up\n # attach document to current context using follow_up\n
follow_up_list = document.getFollowUpValueList()\n follow_up_list = document.getFollowUpValueList()\n
follow_up_list.append(context)\n if context not in follow_up_list:\n
document.setFollowUpValueList([x.getRelativeUrl() for x in follow_up_list])\n # attach to context only if not already attached\n
follow_up_list.append(context)\n
document.setFollowUpValueList([x.getRelativeUrl() for x in follow_up_list])\n
# edit document \n # edit document \n
if document_edit_kw is not {}:\n if document_edit_kw is not {}:\n
document.edit(**document_edit_kw)\n document.edit(**document_edit_kw)\n
......
74 75
\ 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