Commit 44338f01 authored by Jérome Perrin's avatar Jérome Perrin

Base_contribute: don't get values from REQUEST

parent 1e55357b
......@@ -71,7 +71,7 @@ if redirect_to_document is None:\n
if user_login is None:\n
# get current authenticated user\n
user_login = str(portal.portal_membership.getAuthenticatedMember())\n
\n
\n
document_kw = {\'user_login\': user_login,\n
\'group\': group,\n
\'publication_section\': publication_section,\n
......@@ -87,12 +87,9 @@ if follow_up_list:\n
document_kw[\'follow_up_list\'] = follow_up_list\n
\n
\n
form = portal.REQUEST.form\n
# Lookup for input values in request.form or kw to try to get values in two available modes: the\n
# script coulbe be called from ERP5 Form or directly from Python.\n
# FIXME: this list of properties should not be hardcoded.\n
for key in (\'title\', \'short_title\', \'reference\', \'language\', \'version\', \'description\', ):\n
value = form.get(key, kw.get(key, None))\n
value = kw.get(key, None)\n
if value not in MARKER:\n
document_kw[key] = value\n
\n
......
144
\ No newline at end of file
145
\ No newline at end of file
......@@ -1421,17 +1421,6 @@ class TestDocument(TestDocumentMixin):
self.tic()
self.assertEquals('user supplied title', contributed_document.getTitle())
def test_Base_contribute_input_parameter_dict_request(self):
"""Test contributing while entering input parameters through the dialog.
"""
person = self.portal.person_module.newContent(portal_type='Person')
self.portal.REQUEST.form['title'] = 'user supplied title'
contributed_document = person.Base_contribute(
file=makeFileUpload('TEST-en-002.pdf'))
self.tic()
self.assertEquals('user supplied title', contributed_document.getTitle())
def test_HTML_to_ODT_conversion_keep_enconding(self):
"""This test perform an PDF conversion of HTML content
then to plain text.
......
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