From: yomguy Date: Wed, 8 Jun 2011 15:57:49 +0000 (+0200) Subject: fix item access X-Git-Tag: 1.1~118 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6ffa1f604bef971d428f4364c19493a23a419600;p=telemeta.git fix item access --- diff --git a/telemeta/web/base.py b/telemeta/web/base.py index 1a2b9168..5d48bdec 100644 --- a/telemeta/web/base.py +++ b/telemeta/web/base.py @@ -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