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
Labels
Merge Requests
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
cc3aa14d
Commit
cc3aa14d
authored
Apr 11, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! fixup! open_api: more request body support
parent
5fe15e23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
bt5/erp5_open_api/DocumentTemplateItem/portal_components/document.erp5.OpenAPIService.py
...ateItem/portal_components/document.erp5.OpenAPIService.py
+8
-1
No files found.
bt5/erp5_open_api/DocumentTemplateItem/portal_components/document.erp5.OpenAPIService.py
View file @
cc3aa14d
...
...
@@ -29,6 +29,7 @@ import base64
import
binascii
import
json
import
typing
import
six
from
six.moves.urllib.parse
import
unquote
if
typing
.
TYPE_CHECKING
:
...
...
@@ -310,7 +311,13 @@ class OpenAPIService(XMLObject):
if
schema
.
get
(
'format'
)
==
'base64'
:
try
:
return
base64
.
b64decode
(
parameter_value
)
except
binascii
.
Error
as
e
:
except
(
binascii
.
Error
,
TypeError
)
as
e
:
if
isinstance
(
e
,
TypeError
):
# BBB on python2 this raises a generic type error
# but we don't want to ignore potential TypeErrors
# on python3 here
if
six
.
PY3
:
raise
raise
ParameterValidationError
(
'Error validating request body: {e}'
.
format
(
e
=
str
(
e
)))
elif
schema
.
get
(
'format'
)
==
'binary'
:
...
...
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