diff --git a/chat_box/consumers.py b/chat_box/consumers.py index 001b72e..cb7cd18 100644 --- a/chat_box/consumers.py +++ b/chat_box/consumers.py @@ -35,7 +35,7 @@ class ChatConsumer(AsyncWebsocketConsumer): message = text_data_json['message'] author = self.scope['user'] - author = Profile.objects.get(user_id=author.id) + author = Profile.objects.get(user=author) message['author'] = author.username message['css_class'] = author.css_class