Closes #17048: Replace all calls to get_user_model() with direct imports of User

This commit is contained in:
Jeremy Stretch
2024-07-31 16:45:07 -04:00
parent 1a6406632a
commit c51e91dddd
37 changed files with 79 additions and 132 deletions

View File

@@ -2,7 +2,6 @@ import binascii
import os
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.postgres.fields import ArrayField
from django.core.validators import MinLengthValidator
from django.db import models
@@ -25,7 +24,7 @@ class Token(models.Model):
It also supports setting an expiration time and toggling write ability.
"""
user = models.ForeignKey(
to=get_user_model(),
to='users.User',
on_delete=models.CASCADE,
related_name='tokens'
)