mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-08 01:43:17 +00:00
🩹(backend) fix client_id retrieval from request.auth
request.auth is a dict, not an object, so the getattr call was failing when trying to retrieve client_id. Access it as a dict key instead.
This commit is contained in:
committed by
aleb_the_flash
parent
9ba97fd14f
commit
d2bfbee389
@@ -194,10 +194,12 @@ class RoomViewSet(
|
||||
role=models.RoleChoices.OWNER,
|
||||
)
|
||||
|
||||
client_id = (self.request.auth or {}).get("client_id", "unknown")
|
||||
|
||||
# Log for auditing
|
||||
logger.info(
|
||||
"Room created via application: room_id=%s, user_id=%s, client_id=%s",
|
||||
room.id,
|
||||
self.request.user.id,
|
||||
getattr(self.request.auth, "client_id", "unknown"),
|
||||
client_id,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user