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
136133df
Commit
136133df
authored
Sep 14, 2021
by
Guillaume Heurtier
Browse files
FIX #17268 TIME 0:10 fix error messages
parent
2a010c04
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/configuration/controllers/ConfigurationController.php
View file @
136133df
...
...
@@ -315,22 +315,22 @@ 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'
]]);
if
(
empty
(
$doctype
))
{
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
'
Basket
not found'
,
'lang'
=>
'typeIdDoesNotExist'
]);
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
'
Doctype
not found'
,
'lang'
=>
'typeIdDoesNotExist'
]);
}
$customId
=
CoreConfigModel
::
getCustomId
();
...
...
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