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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
7b52d886
Commit
7b52d886
authored
Jun 02, 2022
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
Mar 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_api_style: when no document is found, return 404 error
parent
b7066cf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/ERP5Site_asjIOStyle.py
...teItem/portal_skins/erp5_api_style/ERP5Site_asjIOStyle.py
+5
-1
No files found.
bt5/erp5_api_style/SkinTemplateItem/portal_skins/erp5_api_style/ERP5Site_asjIOStyle.py
View file @
7b52d886
...
@@ -87,7 +87,11 @@ if mode in ("get", "put"):
...
@@ -87,7 +87,11 @@ if mode in ("get", "put"):
else
:
else
:
document
=
context
.
jIOWebSection_getObjectFromData
(
data
)
document
=
context
.
jIOWebSection_getObjectFromData
(
data
)
if
document
is
None
:
if
document
is
None
:
return
logError
(
"The data you provided did not allow to find the corresponding document"
,
error_name
=
"API-JSON-DOCUMENT-NOT-FOUND"
)
return
logError
(
"The data you provided did not allow to find the corresponding document"
,
error_name
=
"API-JSON-DOCUMENT-NOT-FOUND"
,
error_code
=
404
,
)
else
:
else
:
document
=
context
document
=
context
...
...
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