Commit 10ba0383 authored by Romain Courteaud's avatar Romain Courteaud

Do not pass portal_type parameter if empty

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25720 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e0671bc5
...@@ -63,8 +63,11 @@ translateString = context.Base_translateString\n ...@@ -63,8 +63,11 @@ translateString = context.Base_translateString\n
portal_type = kw.get(\'portal_type\', None)\n portal_type = kw.get(\'portal_type\', None)\n
\n \n
# ingest file (asynchronously)\n # ingest file (asynchronously)\n
doc = context.portal_contributions.newContent(file = file,\n if portal_type:\n
doc = context.portal_contributions.newContent(file = file,\n
portal_type = portal_type)\n portal_type = portal_type)\n
else:\n
doc = context.portal_contributions.newContent(file=file)\n
\n \n
msg = translateString("${portal_type} created successfully.",\n msg = translateString("${portal_type} created successfully.",\n
mapping = {\'portal_type\':doc.getPortalType()})\n mapping = {\'portal_type\':doc.getPortalType()})\n
......
34 35
\ 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