Commit 62caa7c0 authored by Bartek Górny's avatar Bartek Górny

fixed - upload file failed on creating new object if any property was None

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10716 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 415ef86b
...@@ -91,7 +91,9 @@ if hasattr(context,\'data\'): # this is a re-upload, we create a \'copy\'\n ...@@ -91,7 +91,9 @@ if hasattr(context,\'data\'): # this is a re-upload, we create a \'copy\'\n
# we rely on ingestion script to determine coordinates\n # we rely on ingestion script to determine coordinates\n
copylist+=[\'title\',\'short_title\',\'index\',\'description\',\'subject\']\n copylist+=[\'title\',\'short_title\',\'index\',\'description\',\'subject\']\n
for a in copylist:\n for a in copylist:\n
newob.setProperty(a,context.getProperty(a))\n v=context.getProperty(a)\n
if v is not None:\n
newob.setProperty(a,v)\n
ob=newob\n ob=newob\n
msg=\'object already had a file - a new object has been created\'\n msg=\'object already had a file - a new object has been created\'\n
else:\n else:\n
...@@ -161,6 +163,7 @@ return context.REQUEST.RESPONSE.redirect(url+\'/view?portal_status_message=\'+ms ...@@ -161,6 +163,7 @@ return context.REQUEST.RESPONSE.redirect(url+\'/view?portal_status_message=\'+ms
<string>_getitem_</string> <string>_getitem_</string>
<string>copylist</string> <string>copylist</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>v</string>
<string>ob</string> <string>ob</string>
<string>msg</string> <string>msg</string>
<string>url</string> <string>url</string>
......
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