mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Use type/value from the passed variable, not self
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user