Пример #1
0
 def _make_comment(self, d, project):
     u = Update(d['id'])
     u.message = d['message']
     u.author = project.find_user(d['author'], None)
     if not u.author:
         # may duplicate users
         u.author = User(d['author'], d['author'])
     u.date = d['date']
     u.changes = []
     u.attachments = [self._make_attachment(dattach) for dattach in d['attachments']]
     return u
Пример #2
0
 def _make_comment(self, d, project):
     u = Update(d['id'])
     u.message = d['message']
     u.author = project.find_user(d['author'], None)
     if not u.author:
         # may duplicate users
         u.author = User(d['author'], d['author'])
     u.date = d['date']
     u.changes = []
     u.attachments = [
         self._make_attachment(dattach) for dattach in d['attachments']
     ]
     return u