From 5e802217fd1171f2bd72357f1285f83c7566e2d1 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Mon, 20 Mar 2017 20:24:44 -0300 Subject: [PATCH] Remove lambda operators --- gestioncof/decorators.py | 4 ++-- kfet/decorators.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gestioncof/decorators.py b/gestioncof/decorators.py index 86bb2ff2..a1263ce3 100644 --- a/gestioncof/decorators.py +++ b/gestioncof/decorators.py @@ -10,7 +10,7 @@ def is_cof(user): except: return False -cof_required = user_passes_test(lambda u: is_cof(u)) +cof_required = user_passes_test(is_cof) def is_buro(user): @@ -20,4 +20,4 @@ def is_buro(user): except: return False -buro_required = user_passes_test(lambda u: is_buro(u)) +buro_required = user_passes_test(is_buro) diff --git a/kfet/decorators.py b/kfet/decorators.py index 46c41495..0c8a1a76 100644 --- a/kfet/decorators.py +++ b/kfet/decorators.py @@ -6,4 +6,4 @@ from django.contrib.auth.decorators import user_passes_test def kfet_is_team(user): return user.has_perm('kfet.is_team') -teamkfet_required = user_passes_test(lambda u: kfet_is_team(u)) +teamkfet_required = user_passes_test(kfet_is_team)