Skip to content
Snippets Groups Projects
Commit ce5e8c40 authored by Vinciane's avatar Vinciane
Browse files

FIX #9349 document format

parent d80738d6
No related branches found
No related tags found
No related merge requests found
...@@ -113,7 +113,6 @@ class ListInstanceController ...@@ -113,7 +113,6 @@ class ListInstanceController
DatabaseModel::beginTransaction(); DatabaseModel::beginTransaction();
foreach ($data['listinstances'] as $ListInstanceByRes) { foreach ($data['listinstances'] as $ListInstanceByRes) {
if (empty($ListInstanceByRes['resId'])) { if (empty($ListInstanceByRes['resId'])) {
DatabaseModel::rollbackTransaction(); DatabaseModel::rollbackTransaction();
return $response->withStatus(400)->withJson(['errors' => 'resId is empty']); return $response->withStatus(400)->withJson(['errors' => 'resId is empty']);
...@@ -141,7 +140,7 @@ class ListInstanceController ...@@ -141,7 +140,7 @@ class ListInstanceController
return $response->withStatus(400)->withJson(['errors' => 'User not found or not active']); return $response->withStatus(400)->withJson(['errors' => 'User not found or not active']);
} }
} elseif ($instance['item_type'] == 'entity_id') { } elseif ($instance['item_type'] == 'entity_id') {
$entity = EntityModel::getByEntityId( ['entityId' => $instance['item_id']] ); $entity = EntityModel::getByEntityId(['entityId' => $instance['item_id']]);
if (empty($entity) || $entity['enabled'] != "Y") { if (empty($entity) || $entity['enabled'] != "Y") {
DatabaseModel::rollbackTransaction(); DatabaseModel::rollbackTransaction();
return $response->withStatus(400)->withJson(['errors' => 'Entity not found or not active']); return $response->withStatus(400)->withJson(['errors' => 'Entity not found or not active']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment