Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
klaus_wendelin
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
Eteri
klaus_wendelin
Commits
01e6c52e
Commit
01e6c52e
authored
Jul 12, 2019
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop passing of REQUEST as a function parameter when it is a global
one (and already used in parts of code) as self.REQUEST.
parent
1c930c97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.IngestionPolicy.py
...teItem/portal_components/document.erp5.IngestionPolicy.py
+6
-6
No files found.
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.IngestionPolicy.py
View file @
01e6c52e
...
...
@@ -53,21 +53,21 @@ class IngestionPolicy(Folder):
return
self
.
portal_ingestion_policies
.
unpack
(
data
)
security
.
declarePublic
(
'ingest'
)
def
ingest
(
self
,
REQUEST
,
**
kw
):
def
ingest
(
self
,
**
kw
):
"""
Ingest chunk of raw data either from a Sensor or any of DAUs.
"""
environ
=
REQUEST
.
environ
environ
=
self
.
REQUEST
.
environ
method
=
environ
.
pop
(
'REQUEST_METHOD'
)
try
:
if
method
!=
'POST'
:
raise
BadRequest
(
'Only POST request is allowed.'
)
if
REQUEST
.
_file
is
not
None
:
assert
not
REQUEST
.
form
,
REQUEST
.
form
# Are cgi and HTTPRequest fixed ?
if
self
.
REQUEST
.
_file
is
not
None
:
assert
not
self
.
REQUEST
.
form
,
self
.
REQUEST
.
form
# Are cgi and HTTPRequest fixed ?
# Query string was ignored so parse again, faking a GET request.
# Such POST is legit: https://stackoverflow.com/a/14710450
REQUEST
.
processInputs
()
REQUEST
.
form
[
'data_chunk'
]
=
REQUEST
.
_file
.
read
()
self
.
REQUEST
.
processInputs
()
self
.
REQUEST
.
form
[
'data_chunk'
]
=
self
.
REQUEST
.
_file
.
read
()
finally
:
environ
[
'REQUEST_METHOD'
]
=
method
...
...
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