[open-ils-commits] r198 - servres/trunk/conifer/syrup (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 18 22:01:02 EDT 2009
Author: gfawcett
Date: 2009-03-18 22:01:00 -0400 (Wed, 18 Mar 2009)
New Revision: 198
Modified:
servres/trunk/conifer/syrup/views.py
Log:
a couple view tweaks. Feeds won't fail when empty.
Modified: servres/trunk/conifer/syrup/views.py
===================================================================
--- servres/trunk/conifer/syrup/views.py 2009-03-17 22:12:18 UTC (rev 197)
+++ servres/trunk/conifer/syrup/views.py 2009-03-19 02:01:00 UTC (rev 198)
@@ -203,6 +203,11 @@
page_num=page_num,
count=count)
+
+def departments(request):
+ raise NotImplementedError
+
+
def user_prefs(request):
return g.render('simplemessage.xhtml',
title=_('Sorry...'),
@@ -1006,8 +1011,7 @@
return '%s :: %s' % (item.parent_heading.title, item.title)
else:
return item.title
-
- lastmod = max(i.last_modified for i in items)
+ lastmod = items and max(i.last_modified for i in items) or datetime.now()
return g.render('feeds/course_atom.xml',
course=course,
feed_type=feed_type,
@@ -1016,3 +1020,4 @@
items=items,
root='http://%s' % request.get_host(),
_serialization='xml')
+
More information about the open-ils-commits
mailing list