Skip to content

Commit

Permalink
feature: refresh from db in set_user_status
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanJaeger committed Nov 13, 2024
1 parent 8509017 commit 20217a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chats/apps/api/websockets/rooms/consumers/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ async def notify(self, event):

@database_sync_to_async
def set_user_status(self, status: str):
self.permission.refresh_from_db()
self.permission.status = status
self.permission.save()
self.permission.save(update_fields=["status"])
self.permission.notify_user("update", "system")

@database_sync_to_async
Expand Down

0 comments on commit 20217a3

Please sign in to comment.