Show More
@@ -129,15 +129,20 b' class CommentsModel(BaseModel):' | |||
|
129 | 129 | |
|
130 | 130 | return comment_versions |
|
131 | 131 | |
|
132 | def get_unresolved_todos(self, pull_request): | |
|
132 | def get_unresolved_todos(self, pull_request, show_outdated=True): | |
|
133 | 133 | |
|
134 | 134 | todos = Session().query(ChangesetComment) \ |
|
135 | 135 | .filter(ChangesetComment.pull_request == pull_request) \ |
|
136 | 136 | .filter(ChangesetComment.resolved_by == None) \ |
|
137 | 137 | .filter(ChangesetComment.comment_type |
|
138 |
== ChangesetComment.COMMENT_TYPE_TODO) |
|
|
139 | .filter(coalesce(ChangesetComment.display_state, '') != | |
|
140 | ChangesetComment.COMMENT_OUTDATED).all() | |
|
138 | == ChangesetComment.COMMENT_TYPE_TODO) | |
|
139 | ||
|
140 | if not show_outdated: | |
|
141 | todos = todos.filter( | |
|
142 | coalesce(ChangesetComment.display_state, '') != | |
|
143 | ChangesetComment.COMMENT_OUTDATED) | |
|
144 | ||
|
145 | todos = todos.all() | |
|
141 | 146 | |
|
142 | 147 | return todos |
|
143 | 148 |
General Comments 0
You need to be logged in to leave comments.
Login now