fix next number unlock table
This commit is contained in:
@@ -75,7 +75,10 @@ class NextNumber extends \Espo\Core\Hooks\Base
|
||||
'fieldName' => $fieldName,
|
||||
'entityType' => $entity->getEntityType()
|
||||
))->findOne();
|
||||
if (!$nextNumber) continue;
|
||||
if (!$nextNumber) {
|
||||
$this->getEntityManager()->getPdo()->query('UNLOCK TABLES');
|
||||
continue;
|
||||
}
|
||||
$entity->set($fieldName, $this->composeNumberAttribute($nextNumber));
|
||||
|
||||
$value = $nextNumber->get('value');
|
||||
|
||||
Reference in New Issue
Block a user