Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchCourrier
Commits
c0030141
Commit
c0030141
authored
Sep 14, 2021
by
Guillaume Heurtier
Browse files
FIX #17268 TIME 0:05 fix error messages
parent
1f189e6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/configuration/controllers/ConfigurationController.php
View file @
c0030141
...
...
@@ -333,17 +333,17 @@ class ConfigurationController
$attachmentType
=
AttachmentTypeModel
::
getById
([
'select'
=>
[
'type_id'
],
'id'
=>
$body
[
'metadata'
][
'attachmentTypeId'
]]);
if
(
empty
(
$attachmentType
))
{
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
'
Basket
not found'
,
'lang'
=>
'attachmentTypeDoesNotExist'
]);
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
'
Attachment type
not found'
,
'lang'
=>
'attachmentTypeDoesNotExist'
]);
}
$indexingModel
=
IndexingModelModel
::
getById
([
'select'
=>
[
1
],
'id'
=>
$body
[
'metadata'
][
'indexingModelId'
]]);
if
(
empty
(
$indexingModel
))
{
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
'
Basket
not found'
,
'lang'
=>
'indexingModelDoesNotExist'
]);
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
'
Indexing model
not found'
,
'lang'
=>
'indexingModelDoesNotExist'
]);
}
$status
=
StatusModel
::
getByIdentifier
([
'select'
=>
[
'id'
],
'identifier'
=>
$body
[
'metadata'
][
'statusId'
]]);
if
(
empty
(
$status
))
{
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
'
Basket
not found'
,
'lang'
=>
'statusDoesNotExist'
]);
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
'
Status
not found'
,
'lang'
=>
'statusDoesNotExist'
]);
}
$doctype
=
DoctypeModel
::
getById
([
'select'
=>
[
1
],
'id'
=>
$body
[
'metadata'
][
'typeId'
]]);
...
...
Write
Preview
Supports
Markdown
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