mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
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:
@@ -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 New Issue
Block a user