[Oi-commits] r1494 - trunk/forum

oi-commits at pardus.org.tr oi-commits at pardus.org.tr
Thu Jun 19 13:02:21 EEST 2008


Author: jnmbk
Date: Thu Jun 19 13:02:21 2008
New Revision: 1494

Modified:
   trunk/forum/views.py
Log:
fix time checker

Modified: trunk/forum/views.py
=================================================================
--- trunk/forum/views.py	(original)
+++ trunk/forum/views.py	Thu Jun 19 13:02:21 2008
@@ -186,7 +186,11 @@
             if option.percent < 80:
                 option.percent_out = True
         # now let's see if we'll enable voting for this user
-        poll_enabled = request.user.is_authenticated() and poll.date_limit and poll.end_date > datetime.now()
+        if request.user.is_authenticated():
+            if poll.date_limit:
+                poll_enabled = poll.end_date > datetime.now()
+            else:
+                poll_enabled = True
     except: #DoesNotExist
         pass
 


More information about the Oi-commits mailing list