From adfe03b77afda0209eb0d65875f78b5d79108ecc Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 15 Sep 2011 12:04:04 +0100 Subject: [PATCH] Use type/value from the passed variable, not self --- app/hr/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/hr/views.py b/app/hr/views.py index 0479ac6..0ab3f64 100644 --- a/app/hr/views.py +++ b/app/hr/views.py @@ -332,7 +332,7 @@ class HrBlacklistUser(FormView): return context def blacklist_item(self, type, value): - Blacklist(type=self.type, value=self.value, level=self.level, source=self.source, expiry_date=self.expiry, created_by=self.request.user, reason=self.reason).save() + Blacklist(type=type, value=value, level=self.level, source=self.source, expiry_date=self.expiry, created_by=self.request.user, reason=self.reason).save() def form_valid(self, form): self.source = BlacklistSource.objects.get(id=1)