mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 01:48:21 +02:00
Deletion of alias now possible!
This commit is contained in:
@ -219,14 +219,6 @@ class Alias(models.Model):
|
||||
if all(not unicodedata.category(char).startswith(cat)
|
||||
for cat in {'M', 'P', 'Z', 'C'})).casefold()
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
"""
|
||||
Handle normalized_name
|
||||
"""
|
||||
self.normalized_name = Alias.normalize(self.name)
|
||||
if len(self.normalized_name) < 256:
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
def clean(self):
|
||||
normalized_name = Alias.normalize(self.name)
|
||||
if len(normalized_name) >= 255:
|
||||
|
@ -36,4 +36,4 @@ class AliasTable(tables.Table):
|
||||
template_name = 'django_tables2/bootstrap4.html'
|
||||
|
||||
delete = tables.LinkColumn('member:user_alias_delete', args=[A('pk')], attrs={
|
||||
'a': {'class': 'btn btn-danger'} },text='delete')
|
||||
'a': {'class': 'btn btn-danger'} },text='delete',accessor='pk')
|
||||
|
Reference in New Issue
Block a user