Skip to content

Commit

Permalink
Fix broken select widgets.
Browse files Browse the repository at this point in the history
  • Loading branch information
amanning9 committed Feb 18, 2022
1 parent b8c8167 commit 686af63
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions jasmin_services/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from django.conf import settings
from django import forms
from django.core.exceptions import ValidationError
from django.contrib.admin.widgets import FilteredSelectMultiple, AdminDateWidget, AutocompleteSelect
from django.contrib.admin.widgets import FilteredSelectMultiple, AdminDateWidget
from django.contrib.auth import get_user_model
from django.utils.safestring import mark_safe
from django.utils.encoding import force_text
Expand Down Expand Up @@ -361,14 +361,12 @@ class Meta:
queryset = Role.objects.all(),
required = True,
label = 'Role',
widget = AutocompleteSelect(Access._meta.get_field('role').remote_field, site),
)

user = forms.ModelChoiceField(
queryset = get_user_model().objects.all(),
required = True,
label = 'User',
widget = AutocompleteSelect(Access._meta.get_field('user').remote_field, site),
)

def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -424,14 +422,12 @@ class Meta:
queryset = Role.objects.all(),
required = True,
label = 'Role',
widget = AutocompleteSelect(Access._meta.get_field('role').remote_field, site),
)

user = forms.ModelChoiceField(
queryset = get_user_model().objects.all(),
required = True,
label = 'User',
widget = AutocompleteSelect(Access._meta.get_field('user').remote_field, site),
)

def __init__(self, *args, **kwargs):
Expand Down

0 comments on commit 686af63

Please sign in to comment.