Merge branch 'develop' into feature/api-v1
# Conflicts: # app/Contracts/Repository/RepositoryInterface.php # app/Repositories/Eloquent/EloquentRepository.php # app/Services/Nodes/NodeUpdateService.php # tests/Unit/Services/Nodes/NodeUpdateServiceTest.php
This commit is contained in:
commit
800e2df6b2
187 changed files with 1878 additions and 3143 deletions
|
@ -63,7 +63,7 @@ class NodeDeletionService
|
|||
$node = $node->id;
|
||||
}
|
||||
|
||||
$servers = $this->serverRepository->withColumns('id')->findCountWhere([['node_id', '=', $node]]);
|
||||
$servers = $this->serverRepository->setColumns('id')->findCountWhere([['node_id', '=', $node]]);
|
||||
if ($servers > 0) {
|
||||
throw new HasActiveServersException($this->translator->trans('exceptions.node.servers_attached'));
|
||||
}
|
||||
|
|
|
@ -65,11 +65,11 @@ class NodeUpdateService
|
|||
if ($this->getUpdatedModel()) {
|
||||
$response = $this->repository->update($node->id, $data);
|
||||
} else {
|
||||
$response = $this->repository->withoutFresh()->update($node->id, $data);
|
||||
$response = $this->repository->withoutFreshModel()->update($node->id, $data);
|
||||
}
|
||||
|
||||
try {
|
||||
$this->configRepository->setNode($node->id)->update();
|
||||
$this->configRepository->setNode($node)->update();
|
||||
} catch (RequestException $exception) {
|
||||
throw new DaemonConnectionException($exception);
|
||||
}
|
||||
|
|
Reference in a new issue