mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Merge pull request #2930 from markparonyan/mypy-db-templates-images
fix(typing): resolve the remaining mypy errors (18 modules)
This commit is contained in:
25 files changed
+201
-147
No files matched your search
@@ -43,7 +43,7 @@ class ComputesService:
|
||||
|
||||
async def create_compute(self, compute_create: schemas.ComputeCreate, connect: bool = False) -> models.Compute:
|
||||
|
||||
if await self._computes_repo.get_compute(compute_create.compute_id):
|
||||
if compute_create.compute_id and await self._computes_repo.get_compute(compute_create.compute_id):
|
||||
raise ControllerBadRequestError(f"Compute '{compute_create.compute_id}' is already registered")
|
||||
db_compute = await self._computes_repo.create_compute(compute_create)
|
||||
compute = await self._controller.add_compute(
|
||||
|
||||
Reference in new issue
Block a user