Merge branch 'bugfix/use-controller' into 'dev'

Use controller on update user call

See merge request crafty-controller/crafty-4!640
This commit is contained in:
Iain Powrie 2023-10-08 18:05:53 +00:00
commit 44b7824f20
2 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@
- Fix Backup Restore/Schedules, Backup button function on `remote-comms2` ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/634))
- Add a wait to the call for the directory so we can make sure the wait dialogue has time to show up first ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/637))
- Fix bug where a reaction loop could be created, but would be cut short by an error when the loop occurred ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/636))
- Use controller on update user call ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/640))
### Refactor
- Consolidate remaining frontend functions into API V2, and remove ajax internal API ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/585))
- Replace bleach with nh3 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/628))

View File

@ -280,7 +280,7 @@ class ApiUsersUserIndexHandler(BaseApiHandler):
if key == "password":
value = self.helper.encode_pass(value)
setattr(user_obj, key, value)
user_obj.save()
self.controller.users.update_user(auth_data[4]["user_id"], data)
self.controller.management.add_to_audit_log(
user["user_id"],