From c824584767b0bf718e19fd9d882cbd535976ce7a Mon Sep 17 00:00:00 2001 From: sepehr Date: Fri, 10 Jan 2025 17:58:38 +0300 Subject: [PATCH] BUG fix: Device edit form changes passowrd without user modification --- py/libs/db/db_device.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/py/libs/db/db_device.py b/py/libs/db/db_device.py index 268bde9..04b5d6a 100644 --- a/py/libs/db/db_device.py +++ b/py/libs/db/db_device.py @@ -138,6 +138,8 @@ def update_device(devid, user_name, password, ip, peer_ip, name): if not device: return False try: + if not password: + password=device['password'] query=Devices.update(user_name=user_name, password=password, ip=ip, peer_ip=peer_ip, name=name).where(Devices.id == devid) query.execute() except: