aboutsummaryrefslogtreecommitdiffstats
path: root/src/booking
diff options
context:
space:
mode:
authorSean Smith <ssmith@iol.unh.edu>2021-03-24 17:22:54 -0400
committerSean Smith <ssmith@iol.unh.edu>2021-03-29 16:21:47 -0400
commitd007fa661e2faf77e70cb75c8d520941e907ebf7 (patch)
tree69b83bf903635768ac8614bfd799de998bb046ea /src/booking
parentf6753ae2c5f54fb79375214590e565218b1bf0d7 (diff)
Remove exposure of users on dashboard
Signed-off-by: Sean Smith <ssmith@iol.unh.edu> Change-Id: I83b93d9247a7eafb54e4a5761d1423a504d86400
Diffstat (limited to 'src/booking')
-rw-r--r--src/booking/forms.py2
-rw-r--r--src/booking/lib.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/booking/forms.py b/src/booking/forms.py
index 2a8784f..b2df799 100644
--- a/src/booking/forms.py
+++ b/src/booking/forms.py
@@ -40,7 +40,7 @@ class QuickBookingForm(forms.Form):
)
self.fields['users'] = SearchableSelectMultipleField(
- queryset=UserProfile.objects.select_related('user').exclude(user=user),
+ queryset=UserProfile.objects.filter(public_user=True).select_related('user').exclude(user=user),
items=get_user_items(exclude=user),
required=False,
**get_user_field_opts()
diff --git a/src/booking/lib.py b/src/booking/lib.py
index 8132c75..7a4c261 100644
--- a/src/booking/lib.py
+++ b/src/booking/lib.py
@@ -23,7 +23,7 @@ def get_user_field_opts():
def get_user_items(exclude=None):
- qs = UserProfile.objects.select_related('user').exclude(user=exclude)
+ qs = UserProfile.objects.filter(public_user=True).select_related('user').exclude(user=exclude)
items = {}
for up in qs:
item = {