allura
修訂 | bca938bf26f70cc57e5975aaaa2f7e64e6c3c86f (tree) |
---|---|
時間 | 2012-07-02 22:01:29 |
作者 | Tim Van Steenburgh <tvansteenburgh@gmai...> |
Commiter | Tim Van Steenburgh |
[#4479] Set repo context for parent/child commits.
Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>
@@ -233,8 +233,12 @@ class Commit(RepoObject): | ||
233 | 233 | result = dict(prev=None, next=None) |
234 | 234 | if self.parent_ids: |
235 | 235 | result['prev'] = self.query.find(dict(_id={'$in': self.parent_ids })).all() |
236 | + for ci in result['prev']: | |
237 | + ci.set_context(self.repo) | |
236 | 238 | if self.child_ids: |
237 | 239 | result['next'] = self.query.find(dict(_id={'$in': self.child_ids })).all() |
240 | + for ci in result['next']: | |
241 | + ci.set_context(self.repo) | |
238 | 242 | return result |
239 | 243 | |
240 | 244 | @LazyProperty |