1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

переработка модальных окон4

This commit is contained in:
MoonTestUse1
2025-01-03 02:47:56 +06:00
parent 50631b8c30
commit 725c120b19
4 changed files with 373 additions and 1 deletions

View File

@@ -63,6 +63,11 @@ def update_employee(
# Обновляем данные
update_data = employee_update.model_dump(exclude_unset=True)
# Если передан пароль, хешируем его
if 'password' in update_data:
update_data['password'] = pwd_context.hash(update_data['password'])
for field, value in update_data.items():
setattr(db_employee, field, value)