From 8d18312e4b04b38b115da799e39b2ebc63e5c681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 13 Aug 2018 21:42:46 +0200 Subject: [PATCH] authentic: update to "new" _meta.get_fields method (#25671) --- hobo/agent/authentic2/role_forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hobo/agent/authentic2/role_forms.py b/hobo/agent/authentic2/role_forms.py index 228bbb8..d8b28f3 100644 --- a/hobo/agent/authentic2/role_forms.py +++ b/hobo/agent/authentic2/role_forms.py @@ -92,7 +92,7 @@ class RoleForm(RoleEditForm): def __init__(self, *args, **kwargs): instance = kwargs.get('instance') if instance: - fields = Role._meta.get_all_field_names() + fields = [x.name for x in Role._meta.get_fields()] initial = kwargs.setdefault('initial', {}) role_attributes = RoleAttribute.objects.filter(role=instance, kind='json') @@ -103,7 +103,7 @@ class RoleForm(RoleEditForm): super(RoleForm, self).__init__(*args, **kwargs) def save(self, commit=True): - fields = Role._meta.get_all_field_names() + fields = [x.name for x in Role._meta.get_fields()] assert commit instance = super(RoleForm, self).save(commit=commit) for field in self.cleaned_data: -- 2.18.0