We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f86cfad commit 5ea2673Copy full SHA for 5ea2673
1 file changed
app/participant_portal_api/serializers/presentation.py
@@ -77,7 +77,9 @@ def to_representation(self, instance):
77
result = super().to_representation(instance)
78
79
if (current_user := get_current_user()) and (speakers := result.get("speakers")):
80
- result["speakers"] = [s for s in speakers if s["user"] == current_user.pk]
+ result["speakers"] = [s for s in speakers if s["user"]["id"] == current_user.pk]
81
+ else:
82
+ result["speakers"] = []
83
84
return result
85
0 commit comments