From f229ff35f909d7afea62ba2e1021a12cb0e16b22 Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Wed, 13 May 2009 05:35:59 +0100 Subject: [svn] Julian playing with the logbooks and expoyears Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8180 by julian @ 1/18/2009 3:59 PM --- expo/randSent.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'expo/randSent.py') diff --git a/expo/randSent.py b/expo/randSent.py index 71be068..a99b974 100644 --- a/expo/randSent.py +++ b/expo/randSent.py @@ -15,6 +15,8 @@ def weighted_choice(lst): def randomLogbookSentence(): randSent={} + # needs to handle empty logbooks without crashing + #Choose a random logbook entry randSent['entry']=LogbookEntry.objects.order_by('?')[0] -- cgit v1.2.3