mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-28 08:09:27 -05:00
fix: every page reload fires a user updated event even when nothing changed (#34838)
Every page load sends the browser's timezone, and the server saved it and fired a user updated event each time, even when it was the timezone already stored. Webhooks and Event functions listening for that event got one per reload for every user. Now the timezone is only saved, and the event only fired, when it actually changes. Fixes #34837
This commit is contained in:
1 parent
765465eed1
commit
c35321f9a4
1 file changed
+2
@@ -296,6 +296,8 @@ async def update_timezone(
|
||||
db: AsyncSession = Depends(get_async_session),
|
||||
):
|
||||
if session_user:
|
||||
if form_data.timezone == session_user.timezone:
|
||||
return {'status': True}
|
||||
await Users.update_user_by_id(
|
||||
session_user.id,
|
||||
{'timezone': form_data.timezone},
|
||||
|
||||
Reference in new issue
Block a user