module
pretalx.submission.domain.queries.feedback
Functions 1
feedback_for_speaker(submission, user)sourceFeedback on submission that user is allowed to see as a speaker.
A speaker sees feedback directed specifically at them, plus general feedback that wasn't routed to any particular speaker. Feedback aimed at co-speakers is intentionally hidden.
def feedback_for_speaker(submission, user):
"""Feedback on ``submission`` that ``user`` is allowed to see as a speaker.
A speaker sees feedback directed specifically at them, plus general
feedback that wasn't routed to any particular speaker. Feedback aimed at
co-speakers is intentionally hidden.
"""
return submission.feedback.filter(
Q(speaker__user=user) | Q(speaker__isnull=True)
).select_related("speaker")