Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchParapheur
Commits
193a98ef
Verified
Commit
193a98ef
authored
May 26, 2021
by
Florian Azizian
Browse files
FIX #16992 TIME 0:10 Error when delete connector that is not used
parent
f29dbc52
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/externalSignatoryBook/controllers/ExternalSignatoryBookController.php
View file @
193a98ef
...
...
@@ -211,11 +211,13 @@ class ExternalSignatoryBookController
]);
$currentDocumentsId
=
array_column
(
$workflows
,
'main_document_id'
);
$documents
=
DocumentModel
::
get
([
'select'
=>
[
'typist'
,
'title'
,
'id'
],
'where'
=>
[
'id in (?)'
],
'data'
=>
[
$currentDocumentsId
]]);
foreach
(
$documents
as
$document
)
{
$process
=
WorkflowController
::
interruptProcess
([
'id'
=>
$document
[
'id'
],
'documentTypist'
=>
$document
[
'typist'
],
'documentTitle'
=>
$document
[
'title'
]]);
if
(
!
empty
(
$process
[
'errors'
]))
{
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
$process
[
'errors'
]]);
if
(
!
empty
(
$currentDocumentsId
))
{
$documents
=
DocumentModel
::
get
([
'select'
=>
[
'typist'
,
'title'
,
'id'
],
'where'
=>
[
'id in (?)'
],
'data'
=>
[
$currentDocumentsId
]]);
foreach
(
$documents
as
$document
)
{
$process
=
WorkflowController
::
interruptProcess
([
'id'
=>
$document
[
'id'
],
'documentTypist'
=>
$document
[
'typist'
],
'documentTitle'
=>
$document
[
'title'
]]);
if
(
!
empty
(
$process
[
'errors'
]))
{
return
$response
->
withStatus
(
400
)
->
withJson
([
'errors'
=>
$process
[
'errors'
]]);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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