Answer the question
In order to leave comments, you need to log in
What causes an error with uuid?
There is a model:
class Account(AbstractUser):
username = None
id = models.UUIDField(
primary_key=True, unique=True, default=uuid.uuid4, editable=False)
phone = models.CharField(
"Телефон", unique=True, max_length=18,
validators=[MinLengthValidator(10), MaxLengthValidator(10)])
email = models.EmailField(
"Email", unique=True, blank=True, null=True, default=None)
USERNAME_FIELD = "phone"
ValidationError at /admin/login/
['Значение “1” не является верным UUID-ом.']
/usr/lib/python3.8/uuid.py, line 169, in __init__
raise ValueError('badly formed hexadecimal UUID string')
Answer the question
In order to leave comments, you need to log in
I found an error, for some reason the old ID-shnik was preserved in the session
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question