mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03: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]:
|
||||
|
||||
update_values = compute_update.model_dump(exclude_unset=True)
|
||||
|
||||
password = compute_update.password
|
||||
if password:
|
||||
update_values["password"] = password.get_secret_value()
|
||||
update_values["password"] = compute_update.password.get_secret_value()
|
||||
|
||||
query = update(models.Compute).\
|
||||
where(models.Compute.compute_id == compute_id).\
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user