mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-09 03:16:25 +00:00
Fix edition des roles + kwargs edition user
This commit is contained in:
parent
b6ded7720a
commit
7d6ab9f7e7
2 changed files with 3 additions and 3 deletions
|
@ -1653,12 +1653,12 @@ class Role(RevMixin, AclMixin, models.Model):
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_instance(cls, machineid, *_args, **_kwargs):
|
def get_instance(cls, roleid, *_args, **_kwargs):
|
||||||
"""Get the Machine instance with machineid.
|
"""Get the Machine instance with machineid.
|
||||||
:param userid: The id
|
:param userid: The id
|
||||||
:return: The user
|
:return: The user
|
||||||
"""
|
"""
|
||||||
return cls.objects.get(pk=machineid)
|
return cls.objects.get(pk=roleid)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def interface_for_roletype(cls, roletype):
|
def interface_for_roletype(cls, roletype):
|
||||||
|
|
|
@ -391,7 +391,7 @@ class AdherentCreationForm(AdherentForm):
|
||||||
class AdherentEditForm(AdherentForm):
|
class AdherentEditForm(AdherentForm):
|
||||||
"""Formulaire d'édition d'un user.
|
"""Formulaire d'édition d'un user.
|
||||||
AdherentForm incluant la modification des champs gpg et shell"""
|
AdherentForm incluant la modification des champs gpg et shell"""
|
||||||
def __init__(self, *args, **kargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(AdherentEditForm, self).__init__(*args, **kwargs)
|
super(AdherentEditForm, self).__init__(*args, **kwargs)
|
||||||
self.fields['gpg_fingerprint'].widget.attrs['placeholder'] = _("Leave empty if you don't have any GPG key.")
|
self.fields['gpg_fingerprint'].widget.attrs['placeholder'] = _("Leave empty if you don't have any GPG key.")
|
||||||
if 'shell' in self.fields:
|
if 'shell' in self.fields:
|
||||||
|
|
Loading…
Reference in a new issue