data_transfer: move update_model (#29545)

This commit is contained in:
Benjamin Dauvergne 2019-01-08 15:24:49 +01:00
parent 75e0b37880
commit 53b9f74ab2
2 changed files with 6 additions and 7 deletions

View File

@ -2,9 +2,13 @@ from django.contrib.contenttypes.models import ContentType
from django_rbac.models import Operation
from django_rbac.utils import (
get_ou_model, get_role_model, get_role_parenting_model, get_permission_model)
get_ou_model, get_role_model, get_role_parenting_model, get_permission_model)
from authentic2.a2_rbac.models import RoleAttribute
from authentic2.utils import update_model
def update_model(obj, d):
for attr, value in d.items():
setattr(obj, attr, value)
def export_site():

View File

@ -1054,11 +1054,6 @@ def send_email_change_email(user, email, request=None, context=None, template_na
legacy_body_templates=legacy_body_templates)
def update_model(obj, d):
for attr, value in d.items():
setattr(obj, attr, value)
def get_user_flag(user, name, default=None):
'''Get a boolean flag settable at user, by a hook, globally or ou wide'''
from . import hooks