We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98c1f62 commit c3c00f7Copy full SHA for c3c00f7
1 file changed
users/serializers.py
@@ -91,7 +91,12 @@ class UserDetailSerializer(serializers.ModelSerializer):
91
@classmethod
92
def get_projects(cls, user: CustomUser):
93
return UserProjectsSerializer(
94
- [collab.project for collab in user.collaborations.all()], many=True
+ [
95
+ collab.project
96
+ for collab in user.collaborations.all()
97
+ if not collab.project.draft
98
+ ],
99
+ many=True,
100
).data
101
102
0 commit comments