]> git.parisson.com Git - telemeta.git/commitdiff
fix item access
authoryomguy <yomguy@parisson.com>
Wed, 8 Jun 2011 15:57:49 +0000 (17:57 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 8 Jun 2011 15:57:49 +0000 (17:57 +0200)
telemeta/web/base.py

index 1a2b9168bb04f5f1223da06a6d95a693fbe9901f..5d48bdec498958e5adeddabcf80a0663bcb4c217 100644 (file)
@@ -293,15 +293,17 @@ class WebView(object):
         elif year_from:
             year = year_from
         else:
-            year = None
+            year = False
         if access == 'full':
             public_access = True
         else:
             public_access = False
-        if year:
+        if year and not year == 'None':
             year_now = datetime.datetime.now().strftime("%Y")
             if int(year_now) - int(year) >= settings.TELEMETA_PUBLIC_ACCESS_PERIOD:
                 public_access = True
+        else:
+            public_access = False
         
         return public_access