From 7d6ab9f7e7bb5e3fe465e93373b3fd4faf2f8d28 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sat, 29 Sep 2018 22:52:57 +0200 Subject: [PATCH] Fix edition des roles + kwargs edition user --- machines/models.py | 4 ++-- users/forms.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/machines/models.py b/machines/models.py index 040043a1..74fc01a1 100644 --- a/machines/models.py +++ b/machines/models.py @@ -1653,12 +1653,12 @@ class Role(RevMixin, AclMixin, models.Model): ) @classmethod - 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) @classmethod def interface_for_roletype(cls, roletype): diff --git a/users/forms.py b/users/forms.py index d2dfabb5..14be399c 100644 --- a/users/forms.py +++ b/users/forms.py @@ -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: