allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/3] allura git commit: [#8077] Removed code duplication in artifact.py and Renamed icon_url to author_icon_url in API
Date Mon, 23 May 2016 15:14:07 GMT
Repository: allura
Updated Branches:
  refs/heads/master 212c359bb -> 4dc36d238


[#8077] Removed code duplication in artifact.py and Renamed icon_url to author_icon_url in
API


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/4dc36d23
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/4dc36d23
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/4dc36d23

Branch: refs/heads/master
Commit: 4dc36d23850fdf5975c62d179b64c7c6dfad0532
Parents: 672003b
Author: Rohan Verma <rohanverma2004@gmail.com>
Authored: Fri May 20 21:50:06 2016 +0530
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Mon May 23 11:04:53 2016 -0400

----------------------------------------------------------------------
 Allura/allura/model/artifact.py | 4 ----
 Allura/allura/model/discuss.py  | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/4dc36d23/Allura/allura/model/artifact.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index d750518..0d177ce 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -682,10 +682,6 @@ class Message(Artifact):
         from .auth import User
         return User.query.get(_id=self.author_id) or User.anonymous()
 
-    def author_icon_url(self):
-        from .auth import User
-        return User.query.get(_id=self.author_id).icon_url()
-
     def index(self):
         result = Artifact.index(self)
         author = self.author()

http://git-wip-us.apache.org/repos/asf/allura/blob/4dc36d23/Allura/allura/model/discuss.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/discuss.py b/Allura/allura/model/discuss.py
index 313c912..25510c8 100644
--- a/Allura/allura/model/discuss.py
+++ b/Allura/allura/model/discuss.py
@@ -200,7 +200,7 @@ class Thread(Artifact, ActivityObject):
                         text=p.text,
                         subject=p.subject,
                         author=p.author().username,
-                        icon_url=p.author_icon_url(),
+                        author_icon_url=h.absurl(p.author().icon_url()),
                         timestamp=p.timestamp,
                         last_edited=p.last_edit_date,
                         attachments=self.attachment_for_export(p) if is_export else self.attachemtns_for_json(p))


Mime
View raw message