aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSawyer Bergeron <sbergeron@iol.unh.edu>2019-04-16 13:31:42 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2019-04-16 13:31:42 -0400
commit01ef094c8248d9dfd2807142ea8e78da71413c8b (patch)
tree05b63d9733b6d171fe21f10ebf28647790190ef0 /src
parent7dc024b48f8d9757a5c43cb5048df2e021f1ad06 (diff)
Fix quick booking image filtering bug
Change-Id: I9fe5b34be2113d3bf7d2e763730b6658f529d387 Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src')
-rw-r--r--src/booking/forms.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/booking/forms.py b/src/booking/forms.py
index 9349ac1..de427ab 100644
--- a/src/booking/forms.py
+++ b/src/booking/forms.py
@@ -41,9 +41,7 @@ class QuickBookingForm(forms.Form):
super(QuickBookingForm, self).__init__(data=data, **kwargs)
self.fields["image"] = forms.ModelChoiceField(
- queryset=Image.objects.difference(
- Image.objects.filter(public=False).difference(Image.objects.filter(owner=user))
- )
+ Image.objects.filter(public=True) | Image.objects.filter(owner=user)
)
self.fields['users'] = forms.CharField(