mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-21 02:58:43 -06:00
Closes #17048: Replace all calls to get_user_model() with direct imports of User
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from django import forms
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from timezone_field import TimeZoneFormField
|
||||
@@ -11,6 +10,7 @@ from extras.models import ConfigTemplate
|
||||
from ipam.models import ASN, IPAddress, VLAN, VLANGroup, VRF
|
||||
from netbox.forms import NetBoxModelForm
|
||||
from tenancy.forms import TenancyForm
|
||||
from users.models import User
|
||||
from utilities.forms import add_blank_choice, get_field_value
|
||||
from utilities.forms.fields import (
|
||||
CommentField, DynamicModelChoiceField, DynamicModelMultipleChoiceField, JSONField, NumericArrayField, SlugField,
|
||||
@@ -311,9 +311,7 @@ class RackReservationForm(TenancyForm, NetBoxModelForm):
|
||||
)
|
||||
user = forms.ModelChoiceField(
|
||||
label=_('User'),
|
||||
queryset=get_user_model().objects.order_by(
|
||||
'username'
|
||||
)
|
||||
queryset=User.objects.order_by('username')
|
||||
)
|
||||
comments = CommentField()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user