From d50e5c127970de578c0f22995dfe1a0d6035af9a Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Thu, 6 Oct 2022 17:03:48 +0200 Subject: [PATCH 1/2] custom_user: remove old import compatibility code (#69902) --- src/authentic2/custom_user/models.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/authentic2/custom_user/models.py b/src/authentic2/custom_user/models.py index baeade85a..968e0738d 100644 --- a/src/authentic2/custom_user/models.py +++ b/src/authentic2/custom_user/models.py @@ -20,6 +20,9 @@ import datetime import os import uuid +from django.contrib.auth.models import AbstractBaseUser +from django.contrib.contenttypes.fields import GenericRelation +from django.contrib.postgres.fields import JSONField from django.core.exceptions import MultipleObjectsReturned, ValidationError from django.core.mail import send_mail from django.db import models, transaction @@ -27,14 +30,6 @@ from django.urls import reverse from django.utils import timezone from django.utils.translation import gettext_lazy as _ -try: - from django.contrib.contenttypes.fields import GenericRelation -except ImportError: - from django.contrib.contenttypes.generic import GenericRelation - -from django.contrib.auth.models import AbstractBaseUser -from django.contrib.postgres.fields import JSONField - from authentic2 import app_settings from authentic2.a2_rbac.models import RoleParenting from authentic2.decorators import errorcollector -- 2.35.1