diff --git a/cof/decorators.py b/cof/decorators.py index d7e70608..a7ced8f7 100644 --- a/cof/decorators.py +++ b/cof/decorators.py @@ -9,8 +9,8 @@ from django_cas_ng.decorators import user_passes_test def is_cof(user): try: - profile = user.profile - return profile.is_cof + cofprofile = user.profile.cof + return cofprofile.is_cof except: return False @@ -21,8 +21,8 @@ cof_required_customdenied = user_passes_test(lambda u: is_cof(u), def is_buro(user): try: - profile = user.profile - return profile.is_buro + cofprofile = user.profile.cof + return cofprofile.is_buro except: return False diff --git a/cof/templates/home.html b/cof/templates/home.html index 5e9732c7..3fc92bfe 100644 --- a/cof/templates/home.html +++ b/cof/templates/home.html @@ -7,7 +7,7 @@
-
+
- {% if not user.profile.is_buro %} + {% if not user.profile.cof.is_buro %}