mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
12794 change User ref to get_user_model (#12905)
* 12794 change User ref to get_user_model * 12794 call get_user_model once in tests * 12794 call get_user_model once in tests * 12794 use settings.AUTH_USER_MODEL for FK reference
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import decimal
|
||||
from functools import cached_property
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.conf import settings
|
||||
from django.contrib.contenttypes.fields import GenericRelation
|
||||
from django.contrib.postgres.fields import ArrayField
|
||||
from django.core.exceptions import ValidationError
|
||||
@@ -505,7 +505,7 @@ class RackReservation(PrimaryModel):
|
||||
null=True
|
||||
)
|
||||
user = models.ForeignKey(
|
||||
to=User,
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
on_delete=models.PROTECT
|
||||
)
|
||||
description = models.CharField(
|
||||
|
Reference in New Issue
Block a user