Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
erp5
Commits
d91be6d8
Commit
d91be6d8
authored
Nov 29, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
due to API we need certain arguments to call properly conversion scripts.
parent
09df9d9f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
bt5/erp5_dms_conversion_catalog/SkinTemplateItem/portal_skins/erp5_dms_conversion_catalog/WebPage_preConvertReferencedImageList.xml
...version_catalog/WebPage_preConvertReferencedImageList.xml
+10
-5
bt5/erp5_dms_conversion_catalog/bt/revision
bt5/erp5_dms_conversion_catalog/bt/revision
+1
-1
No files found.
bt5/erp5_dms_conversion_catalog/SkinTemplateItem/portal_skins/erp5_dms_conversion_catalog/WebPage_preConvertReferencedImageList.xml
View file @
d91be6d8
...
...
@@ -85,11 +85,11 @@ for image_url in image_url_list:\n
convert_string = part_list[1]\n
\n
# check we have locally such a reference so we can convert it\n
kw = {\'portal_type\': portal.getPortalDocumentTypeList() + portal.getPortalEmbeddedDocumentTypeList(),\n
catalog_
kw = {\'portal_type\': portal.getPortalDocumentTypeList() + portal.getPortalEmbeddedDocumentTypeList(),\n
\'reference\': reference,\n
\'validation_state\': validation_state}\n
\n
document = portal.portal_catalog.getResultValue(**kw)\n
document = portal.portal_catalog.getResultValue(**
catalog_
kw)\n
if document is not None:\n
# try to pre convert it based on extracted URL\'s arguments\n
convert_kw = convertUrlArgumentsToDict(convert_string)\n
...
...
@@ -106,10 +106,15 @@ for image_url in image_url_list:\n
for key in convert_kw.keys():\n
if key not in API_ARGUMENT_LIST:\n
convert_kw.pop(key)\n
\n
# due to API we need certain arguments\n
if convert_kw.get(\'quality\') is None:\n
convert_kw[\'quality\'] = kw.get(\'quality\')\n
\n
# do real conversion\n
format = convert_kw.get(\'format\')\n
if format not in MARKER:\n
quality = convert_kw.get(\'quality\')\n
if format not in MARKER and quality not in MARKER:\n
# format is mandatory if it\'s missing then anyway URL request will fail so\n
# don\'t bother create an activity\n
document.activate(priority=4, tag="conversion").Base_callPreConvert(**convert_kw)\n
...
...
bt5/erp5_dms_conversion_catalog/bt/revision
View file @
d91be6d8
2
1
2
2
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment