fix - replace BaseModel -> AbstrasctUser (MRO)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Generated by Django 5.0 on 2025-10-29 13:55
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentication', '0042_alter_organization_national_unique_id'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='user',
|
||||
options={},
|
||||
),
|
||||
migrations.AlterModelManagers(
|
||||
name='user',
|
||||
managers=[
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -2,18 +2,11 @@ from django.contrib.auth.models import (
|
||||
AbstractUser
|
||||
)
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from apps.core.models import BaseModel
|
||||
|
||||
|
||||
class User(AbstractUser, BaseModel):
|
||||
username = models.CharField(
|
||||
max_length=150,
|
||||
help_text=_(
|
||||
"Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only."
|
||||
),
|
||||
)
|
||||
class User(BaseModel, AbstractUser):
|
||||
mobile = models.CharField(max_length=18, null=True)
|
||||
phone = models.CharField(max_length=18, null=True)
|
||||
national_code = models.CharField(max_length=16, null=True)
|
||||
|
||||
Reference in New Issue
Block a user