We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96a6dde commit 227ded3Copy full SHA for 227ded3
1 file changed
users/models.py
@@ -1,6 +1,6 @@
1
from django.contrib.auth.models import AbstractUser
2
from django.db import models
3
-from chats.models import ProjectChat
+from django.db.models import QuerySet
4
5
from users.constants import (
6
ADMIN,
@@ -134,7 +134,9 @@ def calculate_ordering_score(self) -> int:
134
score += 7
135
return score
136
137
- def get_project_chats(self) -> list:
+ def get_project_chats(self) -> QuerySet:
138
+ from chats.models import ProjectChat
139
+
140
user_project_ids = self.collaborations.all().values_list("project_id", flat=True)
141
return ProjectChat.objects.filter(project__in=user_project_ids)
142
0 commit comments