We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a8fc59 commit 8698cc7Copy full SHA for 8698cc7
1 file changed
users/serializers.py
@@ -91,10 +91,7 @@ class UserDetailSerializer(serializers.ModelSerializer):
91
92
def get_projects(self, user: CustomUser):
93
return UserProjectsSerializer(
94
- [
95
- collab.project
96
- for collab in user.collaborations.filter(project__draft=False)
97
- ],
+ [collab.project for collab in user.collaborations.get(project__draft=False)],
98
context={"request": self.context.get("request")},
99
many=True,
100
).data
0 commit comments