|
a/Allura/allura/model/discuss.py |
|
b/Allura/allura/model/discuss.py |
|
... |
|
... |
63 |
_id=str(self._id),
|
63 |
_id=str(self._id),
|
64 |
shortname=self.shortname,
|
64 |
shortname=self.shortname,
|
65 |
name=self.name,
|
65 |
name=self.name,
|
66 |
description=self.description,
|
66 |
description=self.description,
|
67 |
threads=[t.__json__() for t in self.thread_class().query.find(
|
67 |
threads=[t.__json__() for t in self.thread_class().query.find(
|
68 |
dict(discussion_id=self._id)).sort(
|
68 |
dict(discussion_id=self._id))]
|
69 |
'last_post_date', pymongo.DESCENDING)])
|
69 |
)
|
70 |
|
70 |
|
71 |
@property
|
71 |
@property
|
72 |
def activity_name(self):
|
72 |
def activity_name(self):
|
73 |
return 'discussion %s' % self.name
|
73 |
return 'discussion %s' % self.name
|
74 |
|
74 |
|
|
... |
|
... |
170 |
subject=p.subject,
|
170 |
subject=p.subject,
|
171 |
attachments=[dict(bytes=attach.length,
|
171 |
attachments=[dict(bytes=attach.length,
|
172 |
url=h.absurl(attach.url())) for attach in p.attachments])
|
172 |
url=h.absurl(attach.url())) for attach in p.attachments])
|
173 |
for p in self.post_class().query.find(
|
173 |
for p in self.post_class().query.find(
|
174 |
dict(discussion_id=self.discussion_id, thread_id=self._id, status='ok')
|
174 |
dict(discussion_id=self.discussion_id, thread_id=self._id, status='ok')
|
175 |
).sort('timestamp', pymongo.DESCENDING)])
|
175 |
)]
|
|
|
176 |
)
|
176 |
|
177 |
|
177 |
@property
|
178 |
@property
|
178 |
def activity_name(self):
|
179 |
def activity_name(self):
|
179 |
return 'thread %s' % self.subject
|
180 |
return 'thread %s' % self.subject
|
180 |
|
181 |
|