Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 54273c29 authored by chirac's avatar chirac

Merge branch 'fix_divers_front' into 'dev'

Fix edition des roles + kwargs edition user

See merge request federez/re2o!319
parents b6ded772 7d6ab9f7
......@@ -1653,12 +1653,12 @@ class Role(RevMixin, AclMixin, models.Model):
def get_instance(cls, machineid, *_args, **_kwargs):
def get_instance(cls, roleid, *_args, **_kwargs):
"""Get the Machine instance with machineid.
:param userid: The id
:return: The user
return cls.objects.get(pk=machineid)
return cls.objects.get(pk=roleid)
def interface_for_roletype(cls, roletype):
......@@ -391,7 +391,7 @@ class AdherentCreationForm(AdherentForm):
class AdherentEditForm(AdherentForm):
"""Formulaire d'édition d'un user.
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)
self.fields['gpg_fingerprint'].widget.attrs['placeholder'] = _("Leave empty if you don't have any GPG key.")
if 'shell' in self.fields:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment