allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [5/15] git commit: [#5013] ticket:201 removed utcnow from default value
Date Thu, 01 Nov 2012 19:51:24 GMT
[#5013] ticket:201 removed utcnow from default value


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

Branch: refs/heads/db/5080
Commit: a37b35a6a05f2e2a35274a2a7f954a5c2462c71f
Parents: 1172751
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Wed Oct 31 18:15:27 2012 +0400
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Wed Oct 31 16:22:19 2012 +0000

----------------------------------------------------------------------
 Allura/allura/model/artifact.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a37b35a6/Allura/allura/model/artifact.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index 29fe828..752ecb4 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -619,7 +619,7 @@ class Feed(MappedClass):
 
 
     @classmethod
-    def post(cls, artifact, title=None, description=None, author=None, author_link=None,
author_name=None, pubdate=datetime.utcnow()):
+    def post(cls, artifact, title=None, description=None, author=None, author_link=None,
author_name=None, pubdate=None):
         """
         Create a Feed item.  Returns the item.
         But if anon doesn't have read access, create does not happen and None is returned
@@ -639,6 +639,8 @@ class Feed(MappedClass):
         if title is None:
             title='%s modified by %s' % (idx['title_s'], author_name)
         if description is None: description = title
+        if pubdate is None:
+            pubdate = datetime.utcnow()
         item = cls(
             ref_id=artifact.index_id(),
             neighborhood_id=artifact.app_config.project.neighborhood_id,


Mime
View raw message