mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-28 11:12:26 +02:00
Fix bug when updating compute password to be empty
This commit is contained in:
parent
0a118dc9e7
commit
bfed330ec2
@ -69,10 +69,7 @@ class ComputesRepository(BaseRepository):
|
|||||||
async def update_compute(self, compute_id: UUID, compute_update: schemas.ComputeUpdate) -> Optional[models.Compute]:
|
async def update_compute(self, compute_id: UUID, compute_update: schemas.ComputeUpdate) -> Optional[models.Compute]:
|
||||||
|
|
||||||
update_values = compute_update.model_dump(exclude_unset=True)
|
update_values = compute_update.model_dump(exclude_unset=True)
|
||||||
|
update_values["password"] = compute_update.password.get_secret_value()
|
||||||
password = compute_update.password
|
|
||||||
if password:
|
|
||||||
update_values["password"] = password.get_secret_value()
|
|
||||||
|
|
||||||
query = update(models.Compute).\
|
query = update(models.Compute).\
|
||||||
where(models.Compute.compute_id == compute_id).\
|
where(models.Compute.compute_id == compute_id).\
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user