~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/answers/model/question.py

Merge db-devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
908
908
        particular person."""
909
909
        joins = [
910
910
            ("""LEFT OUTER JOIN QuestionMessage
911
 
                ON QuestionMessage.question = Question.id"""),
912
 
            ("""LEFT OUTER JOIN Message
913
 
                ON QuestionMessage.message = Message.id
914
 
                AND Message.owner = %s""" % sqlvalues(person))]
 
911
                ON QuestionMessage.question = Question.id
 
912
                AND QuestionMessage.owner = %s""" % sqlvalues(person))]
915
913
        if self.project:
916
914
            joins.extend(self.getProductJoins())
917
915
 
942
940
                    AND Question.status IN %(owner_status)s)
943
941
                OR (Question.owner != %(person)s AND
944
942
                    Question.status = %(open_status)s AND
945
 
                    Message.owner = %(person)s)
 
943
                    QuestionMessage.owner = %(person)s)
946
944
                )''' % sqlvalues(
947
945
                    person=self.needs_attention_from,
948
946
                    owner_status=[
1153
1151
        QuestionParticipation.ANSWERER: "Question.answerer = %s",
1154
1152
        QuestionParticipation.SUBSCRIBER: "QuestionSubscription.person = %s",
1155
1153
        QuestionParticipation.OWNER: "Question.owner = %s",
1156
 
        QuestionParticipation.COMMENTER: "Message.owner = %s",
 
1154
        QuestionParticipation.COMMENTER: "QuestionMessage.owner = %s",
1157
1155
        QuestionParticipation.ASSIGNEE: "Question.assignee = %s"}
1158
1156
 
1159
1157
    def getConstraints(self):